mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-21 02:06:00 +00:00
fix(provider): restore Azure Cognitive Services endpoints (#37340)
This commit is contained in:
@@ -277,7 +277,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
||||
},
|
||||
}
|
||||
}),
|
||||
"azure-cognitive-services": Effect.fnUntraced(function* () {
|
||||
"azure-cognitive-services": Effect.fnUntraced(function* (provider: Info) {
|
||||
const resourceName = yield* dep.get("AZURE_COGNITIVE_SERVICES_RESOURCE_NAME")
|
||||
return {
|
||||
autoload: false,
|
||||
@@ -285,7 +285,9 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
||||
return selectAzureLanguageModel(sdk, modelID, Boolean(options?.["useCompletionUrls"]))
|
||||
},
|
||||
options: {
|
||||
baseURL: resourceName ? `https://${resourceName}.cognitiveservices.azure.com/openai` : undefined,
|
||||
baseURL: resourceName
|
||||
? `https://${resourceName}.cognitiveservices.azure.com/openai${provider.options?.useDeploymentBasedUrls ? "" : "/v1"}`
|
||||
: undefined,
|
||||
},
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user