test: record a private client URL in the provider behavior snapshot

A sixteenth override shape, a key with a private base URL, so the snapshot
holds usesServerEndpoint's answer for the server's own network before the
function changes. 252 rows added, none changed.
This commit is contained in:
dayuan.jiang
2026-10-12 21:17:51 +09:00
parent 25a1059648
commit 841efcfea2
2 changed files with 258 additions and 2 deletions
+6 -2
View File
@@ -267,7 +267,7 @@ const ENVIRONMENTS: Record<string, (p: ProviderName) => Env> = {
const CLIENT_URL = "https://u.example/v1"
const CLIENT_KEY = "client-key"
/** Fifteen shapes of client override; some need variables of their own */
/** Sixteen shapes of client override; some need variables of their own */
const SHAPES: Record<
string,
{ overrides: Omit<ClientOverrides, "provider" | "modelId">; env?: Env }
@@ -318,6 +318,10 @@ const SHAPES: Record<
overrides: { vertexApiKey: "client-vertex-key", baseUrl: CLIENT_URL },
},
trustedUrl: { overrides: { baseUrl: CLIENT_URL, trustedBaseUrl: true } },
// A private address: usesServerEndpoint counts it as the server's network
keyAndPrivateUrl: {
overrides: { apiKey: CLIENT_KEY, baseUrl: "http://10.0.0.5:8000/v1" },
},
}
/** The shapes that carry a client URL, for the MiniMax /anthropic probe */
@@ -445,7 +449,7 @@ describe("provider behavior snapshot", () => {
})
it("matches the recorded behavior", async () => {
// The matrix: 24 providers, 15 shapes, 9 environments
// The matrix: 24 providers, 16 shapes, 9 environments
for (const provider of MATRIX_PROVIDERS) {
await matrix(provider, MATRIX_MODEL_IDS[provider])
}