mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-26 10:03:36 +00:00
fix(provider): restore Azure Cognitive Services endpoints (#37340)
This commit is contained in:
parent
d8a1b932eb
commit
95ebf50ace
1 changed files with 4 additions and 2 deletions
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue