mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-03 11:01:22 +08:00
fix(opencode): use OpenAI-compatible SDK for APINebula preset
APINebula is an OpenAI-compatible relay (its base URL ends in /v1, matching its Codex/OpenClaw/Hermes presets), but the OpenCode preset loaded the @ai-sdk/openai package, which targets the OpenAI Responses API and fails against chat-completions-only upstreams. Switch the npm field to @ai-sdk/openai-compatible so requests use the OpenAI Chat Completions format.
This commit is contained in:
@@ -1250,7 +1250,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
|||||||
websiteUrl: "https://apinebula.com",
|
websiteUrl: "https://apinebula.com",
|
||||||
apiKeyUrl: "https://apinebula.com/02rw5X",
|
apiKeyUrl: "https://apinebula.com/02rw5X",
|
||||||
settingsConfig: {
|
settingsConfig: {
|
||||||
npm: "@ai-sdk/openai",
|
npm: "@ai-sdk/openai-compatible",
|
||||||
name: "APINebula",
|
name: "APINebula",
|
||||||
options: {
|
options: {
|
||||||
baseURL: "https://apinebula.com/v1",
|
baseURL: "https://apinebula.com/v1",
|
||||||
|
|||||||
Reference in New Issue
Block a user