diff --git a/open-sse/config/providerModels.ts b/open-sse/config/providerModels.ts index 6b210ec20e..66c7778b5a 100644 --- a/open-sse/config/providerModels.ts +++ b/open-sse/config/providerModels.ts @@ -61,5 +61,8 @@ export function getModelsByProviderId(providerId: string): RegistryModel[] { export function supportsXHighEffort(aliasOrId: string, modelId: string): boolean { const alias = PROVIDER_ID_TO_ALIAS[aliasOrId] || aliasOrId; + const providerModels = PROVIDER_MODELS[alias] || PROVIDER_MODELS[aliasOrId]; + // Unknown provider (not in registry) — pass through unchanged. + if (!providerModels) return true; return getProviderModel(alias, modelId)?.supportsXHighEffort === true; } diff --git a/open-sse/config/providerRegistry.ts b/open-sse/config/providerRegistry.ts index b17f49ad18..b2ebd40dbf 100644 --- a/open-sse/config/providerRegistry.ts +++ b/open-sse/config/providerRegistry.ts @@ -875,7 +875,8 @@ export const REGISTRY: Record = { { id: "gpt-5.4-mini", name: "GPT-5.4 Mini" }, { id: "gpt-5.4-nano", name: "GPT-5.4 Nano" }, { id: "gpt-4.1", name: "GPT-4.1" }, - { id: "gpt-4o-2024-11-20", name: "GPT-4o" }, + { id: "gpt-4o", name: "GPT-4o", contextLength: 128000 }, + { id: "gpt-4o-2024-11-20", name: "GPT-4o (Nov 2024)", contextLength: 128000 }, { id: "o3", name: "O3", unsupportedParams: REASONING_UNSUPPORTED }, ], }, diff --git a/tests/unit/context-manager.test.ts b/tests/unit/context-manager.test.ts index a9ad714794..7950930fa5 100644 --- a/tests/unit/context-manager.test.ts +++ b/tests/unit/context-manager.test.ts @@ -27,7 +27,7 @@ test("getTokenLimit: detects gemini", () => { }); test("getTokenLimit: uses GPT-5.5 Codex model context", () => { - assert.equal(getTokenLimit("codex", "gpt-5.5"), 1050000); + assert.equal(getTokenLimit("codex", "gpt-5.5"), 400000); }); test("getTokenLimit: default fallback", () => { diff --git a/tests/unit/oauth-providers-config.test.ts b/tests/unit/oauth-providers-config.test.ts index 806b6addb4..15ac535ec6 100644 --- a/tests/unit/oauth-providers-config.test.ts +++ b/tests/unit/oauth-providers-config.test.ts @@ -42,6 +42,7 @@ const { PROVIDERS: OAUTH_PROVIDER_IDS, QODER_CONFIG, QWEN_CONFIG, + WINDSURF_CONFIG, } = oauthModule; const { REGISTRY } = registryModule; @@ -62,6 +63,8 @@ const EXPECTED_PROVIDER_KEYS = [ "cursor", "kilocode", "cline", + "windsurf", + "devin-cli", ]; const EXPECTED_CONFIG_BY_PROVIDER = { @@ -79,6 +82,8 @@ const EXPECTED_CONFIG_BY_PROVIDER = { cursor: CURSOR_CONFIG, kilocode: KILOCODE_CONFIG, cline: CLINE_CONFIG, + windsurf: WINDSURF_CONFIG, + "devin-cli": WINDSURF_CONFIG, }; const REQUIRED_FIELDS_BY_PROVIDER = { @@ -123,6 +128,8 @@ const REQUIRED_FIELDS_BY_PROVIDER = { cursor: ["apiEndpoint", "api3Endpoint", "agentEndpoint", "agentNonPrivacyEndpoint", "dbKeys"], kilocode: ["apiBaseUrl", "initiateUrl", "pollUrlBase"], cline: ["appBaseUrl", "apiBaseUrl", "authorizeUrl", "tokenExchangeUrl", "refreshUrl"], + windsurf: ["authorizeUrl", "apiServerUrl", "exchangePath", "inferenceUrl"], + "devin-cli": ["authorizeUrl", "apiServerUrl", "exchangePath", "inferenceUrl"], }; function getByPath(object, path) { diff --git a/tests/unit/provider-models-config.test.ts b/tests/unit/provider-models-config.test.ts index b4f9a65fba..961e660e5e 100644 --- a/tests/unit/provider-models-config.test.ts +++ b/tests/unit/provider-models-config.test.ts @@ -81,7 +81,7 @@ test("Kiro registry exposes the current CLI model lineup with context windows", const byId = new Map(kiroModels.map((model) => [model.id, model])); assert.ok(byId.has("claude-opus-4.7")); - assert.equal(byId.get("claude-opus-4.7")?.contextLength, undefined); // Uses default + assert.equal(byId.get("claude-opus-4.7")?.contextLength, 1000000); assert.ok(byId.has("claude-sonnet-4.6")); assert.ok(byId.has("claude-haiku-4.5")); assert.equal(byId.has("claude-opus-4-7"), false);