Merge ba811b4629c0bc06ca2df4132eda84ea8422f0ef into 9fb78453e088cd7b553d7779faa0de5c83708e70
This commit is contained in:
commit
d8a3fa658e
@ -506,7 +506,7 @@ describe("applyCustomApiConfig", () => {
|
||||
const provider = result.config.models?.providers?.[providerId];
|
||||
|
||||
expect(provider?.baseUrl).toBe("https://my-resource.services.ai.azure.com/openai/v1");
|
||||
expect(provider?.api).toBe("openai-completions");
|
||||
expect(provider?.api).toBe("openai-responses");
|
||||
expect(provider?.authHeader).toBe(false);
|
||||
expect(provider?.headers).toEqual({ "api-key": "key123" });
|
||||
|
||||
|
||||
@ -686,7 +686,7 @@ export function applyCustomApiConfig(params: ApplyCustomApiConfigParams): Custom
|
||||
normalizeOptionalProviderApiKey(params.apiKey) ??
|
||||
normalizeOptionalProviderApiKey(existingApiKey);
|
||||
|
||||
const providerApi = isAzureOpenAi
|
||||
const providerApi = isAzure
|
||||
? ("openai-responses" as const)
|
||||
: resolveProviderApi(params.compatibility);
|
||||
const azureHeaders = isAzure && normalizedApiKey ? { "api-key": normalizedApiKey } : undefined;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user