Skip to content

feat(sse): provider-family auto combos auto/glm, auto/minimax, auto/zai, auto/mimo, auto/gemma, auto/llama, auto/gemini (#6453) - #6509

Merged
diegosouzapw merged 2 commits into
release/v3.8.46from
feat/6453-provider-family-auto-combos
Jul 7, 2026
Merged

diegosouzapw merged 2 commits into
release/v3.8.46from
feat/6453-provider-family-auto-combos

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

New routable ids auto/<family> — auto/glm, auto/minimax, auto/mimo, auto/zai, auto/gemma, auto/llama, auto/gemini — that materialize an on-demand virtual combo spanning whatever installed backends currently expose that model family, degrading gracefully as backends rotate. This is a new axis alongside the existing task-mode (auto/best-coding) and category:tier (auto/coding:fast) combos: instead of grouping by routing intent, it groups by underlying model family.

  • New pure module open-sse/services/autoCombo/modelFamily.ts:
    • detectModelFamily(modelId) — prefix-based classification for glm, minimax, mimo, gemma, llama, gemini.
    • zai alias rule: z.ai's hosted API serves the same glm-* model ids as every other GLM backend (glm provider, custom OpenAI/Anthropic-compatible connections, etc.), so auto/zai is deliberately not a model-name prefix rule — it's resolved by provider id instead. auto/zai means "route to my z.ai backend specifically"; auto/glm means "route to any connected provider currently serving a GLM model, z.ai included". Documented inline in modelFamily.ts.
  • Wired into the existing on-demand recognition/materialization path (builtinCatalog.ts::createBuiltinAutoCombo / isRecognizedBuiltinAuto) — reuses createVirtualAutoCombo (no DB writes), extended with an optional family overlay on AutoComboSpec alongside the existing category/tier overlay.
  • Advertised in the /v1/models catalog listing (src/app/api/v1/models/catalog.ts) alongside the existing auto/* entries via the new AUTO_FAMILY_IDS list.
  • Unknown auto/<family> ids fall through to the same clean "Unknown built-in auto combo" 400 error every other unrecognized auto/* id already gets — no new error path, no raw error leakage.
  • A family with zero matching connected/no-auth candidates degrades to an empty candidate pool (never silently falls back to the full pool, matching the existing :free/:pro tier-filter precedent) — routing among a subset when partially available.

Test plan

  • New test file tests/unit/autoCombo/provider-family-combos.test.ts (vitest, real temp-DB backed like virtual-auto-combo.test.ts):
    • detectModelFamily pure classification for all 6 prefix families + null for unrelated ids + confirms zai is never detected from a model id.
    • isValidModelFamily / AUTO_FAMILY_IDS shape.
    • auto/glm materializes a combo spanning BOTH a glm provider connection and a zai provider connection (both serving glm-5.2), excluding an unrelated openai connection.
    • auto/zai materializes a combo with ONLY the zai-provider connection, even though a glm provider connection also serves a GLM model (proves the provider-override rule).
    • Degrade-gracefully path: auto/minimax excludes a connected-but-unrelated openai candidate while including only genuine minimax-family candidates.
    • auto/<unknownfamily> rejects with the same clean "Unknown built-in auto combo" error.
    • isRecognizedBuiltinAuto recognizes all 7 family ids.
    • 11/11 passing: npx vitest run --config vitest.mcp.config.ts tests/unit/autoCombo/provider-family-combos.test.ts
  • npm run test:vitest — 242/243 passing (the 1 failure, open-sse/mcp-server/__tests__/audit.test.ts, is a pre-existing timeout flake under full-suite thread contention; passes 3/3 in isolation, file untouched by this PR).
  • node --import tsx/esm --test tests/unit/virtual-auto-combo.test.ts tests/unit/auto-combos-enhanced-4235.test.ts tests/unit/auto-custom-provider-5873.test.ts — 14/14 passing (no regression to the existing auto-combo test suites).
  • npm run typecheck:core — clean.
  • npm run typecheck:noimplicit:core — the only 2 pre-existing errors (combo.ts, cliRuntime.ts) are untouched by this PR (base-red, confirmed via git diff --stat).
  • npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files> — clean.
  • node scripts/check/check-file-size.mjs — no new violations on touched files (4 pre-existing base-reds elsewhere, untouched by this PR).
  • node scripts/check/check-complexity.mjs — verified 0 NEW violations introduced by this PR's edits to virtualFactory.ts/catalog.ts (both already had the same violated functions over the cyclomatic cap before this change; diffed base vs after via a same-directory temp-file eslint run — identical violation count, only body/line-number growth on already-flagged functions). The global count regression (2035→2048) is pre-existing repo-wide drift, not attributable to this PR's 3 touched files.
  • npm run check:cycles — clean.

Closes #6453

…ai, auto/mimo, auto/gemma, auto/llama, auto/gemini (#6453)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

…zai, auto/mimo, auto/gemma, auto/llama, auto/gemini) (#6453) (#6509)

Sync onto release/v3.8.46. Vitest suite (autoCombo scope) 11/11 green.
@diegosouzapw
diegosouzapw merged commit 0d3d31c into release/v3.8.46 Jul 7, 2026
diegosouzapw added a commit that referenced this pull request Jul 7, 2026
…els is on (#6512) (#6518)

Sync onto release/v3.8.46 (composes with #6509's virtualFactory changes).
Fix a phantom regression guard: paid-model-filter-6512.test.ts lives in the
vitest-only tests/unit/autoCombo scope but imported node:test, so it ran in no
runner — switched to the vitest import. Now 4/4 execute (verified red without the
filter).
@diegosouzapw
diegosouzapw deleted the feat/6453-provider-family-auto-combos branch July 7, 2026 19:20
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…ai, auto/mimo, auto/gemma, auto/llama, auto/gemini (diegosouzapw#6453) (diegosouzapw#6509)

Provider-family auto combos (diegosouzapw#6453). Integrated into release/v3.8.46; vitest autoCombo suite 11/11 green.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ai, auto/mimo, auto/gemma, auto/llama, auto/gemini (diegosouzapw#6453) (diegosouzapw#6509)

Provider-family auto combos (diegosouzapw#6453). Integrated into release/v3.8.46; vitest autoCombo suite 11/11 green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant