From 121023e4182c0d46d53bbd4c2bdf65323c0a74c1 Mon Sep 17 00:00:00 2001 From: Dizzle <112548150+maxmad64bis@users.noreply.github.com> Date: Thu, 20 Aug 2026 11:30:12 +0200 Subject: [PATCH] docs: document combo invocation by exact model name (#7992) (#10779) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merged via merge-train (release/v3.8.50, batch1 2026-08-20) — static gates (typecheck/file-size/complexity/cognitive/changelog) green on the combined tree; test:unit reds observed in the boarded run were verified pre-existing on the pure release tip (unrelated flake), not caused by this PR. Thanks for the contribution! --- .../10779-combo-invocation-docs.md | 1 + docs/getting-started/AUTO-COMBO-GUIDE.md | 2 +- docs/routing/AUTO-COMBO.md | 22 +++++++++++ src/app/(dashboard)/dashboard/combos/page.tsx | 27 ++++++++++++++ src/i18n/messages/en.json | 4 ++ .../unit/combo-guide-invocation-keys.test.ts | 37 +++++++++++++++++++ 6 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 changelog.d/maintenance/10779-combo-invocation-docs.md create mode 100644 tests/unit/combo-guide-invocation-keys.test.ts diff --git a/changelog.d/maintenance/10779-combo-invocation-docs.md b/changelog.d/maintenance/10779-combo-invocation-docs.md new file mode 100644 index 0000000000..00138a3a65 --- /dev/null +++ b/changelog.d/maintenance/10779-combo-invocation-docs.md @@ -0,0 +1 @@ +- **docs:** Custom combos are only invoked by their exact name in the `model` field — `auto` remains a separate zero-config router, and `openrouter/auto` is a paid OpenRouter product, not an alias ([#10779](https://github.com/diegosouzapw/OmniRoute/pull/10779)) — thanks @maxmad64bis diff --git a/docs/getting-started/AUTO-COMBO-GUIDE.md b/docs/getting-started/AUTO-COMBO-GUIDE.md index b5797c780e..fbba5abbe7 100644 --- a/docs/getting-started/AUTO-COMBO-GUIDE.md +++ b/docs/getting-started/AUTO-COMBO-GUIDE.md @@ -189,7 +189,7 @@ Use `auto/smart` when you want the best quality and are okay with occasional exp ### "Can I force a specific provider?" -Yes! Use a combo with `priority` strategy instead of `auto`. See the [Technical Reference](../routing/AUTO-COMBO.md) for details. +Yes! Use a combo with `priority` strategy instead of `auto`, then send the combo's **exact name** as the `model` field (e.g. `model: "my-combo"` — not `auto`). See the [Technical Reference](../routing/AUTO-COMBO.md) for details. ### "How is this different from round-robin?" diff --git a/docs/routing/AUTO-COMBO.md b/docs/routing/AUTO-COMBO.md index 7a0b387191..bad9aa43dd 100644 --- a/docs/routing/AUTO-COMBO.md +++ b/docs/routing/AUTO-COMBO.md @@ -159,6 +159,28 @@ enumerating every existing combo that shadows a model id, so operators who hit this by accident (rather than intentionally, per #6940) have a signal. The detection helper lives in `src/lib/combos/modelNameCollision.ts`. +## Calling a Custom Combo From a Client + +Persisted combos (Settings → Combos) are only used when the client sends the combo's **exact name** in the `model` field — there is no fuzzy or partial matching of the combo name, and no `auto/` prefix involved. Resolution order (`getComboForModel()` in `src/sse/services/model.ts`): + +1. exact combo-name match (`model: "my-combo"`), +2. `combo/` prefix (`model: "combo/my-combo"`), +3. model→combo glob mappings (`/api/model-combo-mappings`). + +```bash +curl -X POST http://localhost:20128/v1/chat/completions \ + -H "Authorization: Bearer " \ + -H "Content-Type: application/json" \ + -d '{"model":"my-combo","messages":[{"role":"user","content":"Hello"}]}' +``` + +Two common pitfalls: + +- **`auto` does not use your combos.** `auto`/`auto/*` builds its own zero-config candidate pool and only consults persisted combos if a combo is literally named `auto` (not recommended). To route through a combo, send its exact name — not `auto`. +- **`openrouter/auto` is a real paid OpenRouter product** ("Auto Best Available"), not an OmniRoute alias. It is the single static model entry of the OpenRouter registry (`open-sse/config/providers/registry/openrouter/index.ts`) and is billed separately. Use Settings → Routing → Hide paid models to exclude it from `auto` pools. + +See [#7992](https://github.com/diegosouzapw/OmniRoute/issues/7992) and [#7111](https://github.com/diegosouzapw/OmniRoute/issues/7111) for the original confusion this documents. + ## How It Works (Persisted Auto-Combos) The Auto-Combo Engine dynamically selects the best provider/model for each request using a **14-factor scoring function** (defined in `open-sse/services/autoCombo/scoring.ts` → `DEFAULT_WEIGHTS`). Weights form a normalized distribution (custom weights are renormalized by `normalizeScoringWeights()`). diff --git a/src/app/(dashboard)/dashboard/combos/page.tsx b/src/app/(dashboard)/dashboard/combos/page.tsx index 5cf1c76784..f456d8c6d9 100644 --- a/src/app/(dashboard)/dashboard/combos/page.tsx +++ b/src/app/(dashboard)/dashboard/combos/page.tsx @@ -1440,6 +1440,33 @@ function ComboUsageGuide({ onHide, onHideForever, onCreateCombo }) { })} +
+

+ {getI18nOrFallback(t, "usageGuideInvokeTitle", "How to call this combo")} +

+

+ {getI18nOrFallback( + t, + "usageGuideInvokeDesc", + 'Send the combo\'s exact name as the model, e.g. model: "my-combo" (or combo/my-combo).' + )} +

+

+ {getI18nOrFallback( + t, + "usageGuideInvokeAutoNote", + "auto and auto/* are a separate zero-config router that does not use your combos (unless a combo is literally named auto)." + )} +

+

+ {getI18nOrFallback( + t, + "usageGuideInvokeOpenrouterNote", + "openrouter/auto is a real paid OpenRouter product (Auto Best Available), not an OmniRoute alias — exclude it via Settings → Routing → Hide paid models." + )} +

+
+