Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
fix(types): remove extraneous config/models from AutoComboConfig returns and type seedConnection overrides
diegosouzapw7d8b7831957c
diff --git a/open-sse/services/autoCombo/virtualFactory.ts b/open-sse/services/autoCombo/virtualFactory.tsindex 123af3bda7..d8777fd6f5 100644--- a/open-sse/services/autoCombo/virtualFactory.ts+++ b/open-sse/services/autoCombo/virtualFactory.ts@@ -55,13 +55,6 @@ export async function createVirtualAutoCombo(weights: { ...DEFAULT_WEIGHTS },explorationRate: 0.05,routerStrategy: "lkgp",- config: {- candidatePool: emptyPool,- weights: { ...DEFAULT_WEIGHTS },- explorationRate: 0.05,- routingStrategy: "lkgp",- },- models: emptyPool,};}@@ -122,20 +115,9 @@ export async function createVirtualAutoCombo(id: `virtual-auto-${variant || "default"}`,name: `Auto ${variant || "Default"}`,type: "auto",- // Root-level fields for AutoComboConfig type compatibilitycandidatePool: pool,weights: weights,explorationRate: explorationRate,routerStrategy: routerStrategy,- // Nested config for combo router's auto-type handler- // (reads via: combo?.autoConfig || combo?.config?.auto || combo?.config || {})- config: {- candidatePool: pool,- weights: weights,- explorationRate: explorationRate,- routingStrategy: routerStrategy,- },- // models array so resolveComboTargets doesn't get an empty array- models: pool,};}diff --git a/tests/unit/models-catalog-route.test.ts b/tests/unit/models-catalog-route.test.tsindex b6045efe90..495b730abf 100644--- a/tests/unit/models-catalog-route.test.ts+++ b/tests/unit/models-catalog-route.test.ts@@ -24,16 +24,19 @@ async function resetStorage() {fs.mkdirSync(TEST_DATA_DIR, { recursive: true });}-async function seedConnection(provider, overrides = {}) {+async function seedConnection(+ provider: string,+ overrides: Record<string, unknown> = {}+) {return providersDb.createProviderConnection({provider,- authType: overrides.authType || "apikey",- name: overrides.name || `${provider}-${Math.random().toString(16).slice(2, 8)}`,- apiKey: overrides.apiKey || "sk-test",- accessToken: overrides.accessToken,- isActive: overrides.isActive ?? true,- testStatus: overrides.testStatus || "active",- providerSpecificData: overrides.providerSpecificData || {},+ authType: (overrides.authType as string) || "apikey",+ name: (overrides.name as string) || `${provider}-${Math.random().toString(16).slice(2, 8)}`,+ apiKey: (overrides.apiKey as string) || "sk-test",+ accessToken: overrides.accessToken as string | undefined,+ isActive: (overrides.isActive as boolean) ?? true,+ testStatus: (overrides.testStatus as string) || "active",+ providerSpecificData: (overrides.providerSpecificData as Record<string, unknown>) || {},});}