Skip to content

fix(combos): expose synced reasoning-effort variants in Combo Builder model picker (#8072) - #8165

Merged
diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.49from
Dingding-leo:fix/combo-builder-effort-variants
Jul 22, 2026
Merged

diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.49from
Dingding-leo:fix/combo-builder-effort-variants

Conversation

@Dingding-leo

Copy link
Copy Markdown
Contributor

Summary

Fixes #8072. Synced reasoning-effort aliases (e.g. GLM-5.2-high, GLM-5.2-medium, GLM-5.2-low) appear in the catalog and Playground but were missing from the Combo Builder's inline model picker. buildModelOptions() added base synced records but never ran appendSyncedEffortVariants().

Changes

  • src/lib/combos/builderOptions.ts:
    • Add supportedThinkingEfforts to SyncedModelLike type
    • Import appendSyncedEffortVariants from the shared utility
    • After the synced models loop, convert models with non-empty supportedThinkingEfforts into catalog-shaped entries, run appendSyncedEffortVariants(), and add new variant ids to the model map
    • Variants inherit the base model's endpoints, context length, output limit, and thinking support
    • Reuses the existing utility (preserving its effort normalization, provider exclusions for codex/kimi, suffix-collision handling, and naming behavior)

Verification

  • npx tsc --pretty false -p tsconfig.typecheck-core.json — zero errors
  • combo-builder-options-route.test.ts + combo-builder-model-source-5477.test.ts + sync-reasoning-supported-efforts-7694.test.ts — 27/27 pass

1 file changed, +51 −3

… model picker (#8072)

Synced reasoning-effort aliases (e.g. GLM-5.2-high, GLM-5.2-medium)
appear in the catalog and Playground but were missing from the Combo
Builder's inline model picker. buildModelOptions() added base synced
records but never ran appendSyncedEffortVariants().

Convert synced models with non-empty supportedThinkingEfforts into
catalog-shaped entries, run the shared appendSyncedEffortVariants
utility (preserving its effort normalization, provider exclusions,
suffix-collision handling, and naming behavior), and add any new
variant ids to the builder model map. Variants inherit the base
model's endpoints, context length, output limit, and thinking support.
Copilot AI review requested due to automatic review settings July 22, 2026 14:06
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90b833e5c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +392 to +398
const catalogShaped = syncedModels
.filter(
(m): m is SyncedModelLike & { id: string; supportedThinkingEfforts: string[] } =>
typeof m.id === "string" &&
Array.isArray(m.supportedThinkingEfforts) &&
m.supportedThinkingEfforts.length > 0
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve hidden filtering when adding variants

When a synced base model is hidden, the first loop drops it through addModelOption(), but this new pass starts again from the raw syncedModels list and synthesizes base-high/base-medium aliases anyway. Because addModelOption() only checks the synthetic alias id, not the hidden base id, any user-hidden synced model with supportedThinkingEfforts can reappear in the Combo Builder picker under its effort variants and be selected despite being hidden.

Useful? React with 👍 / 👎.

Comment thread src/lib/combos/builderOptions.ts Outdated
Comment on lines +415 to +419
const baseId =
typeof variant.root === "string"
? variant.root.startsWith(`${providerId}/`)
? variant.root.slice(providerId.length + 1)
: variant.root

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Look up the real base model before copying metadata

For entries returned by appendSyncedEffortVariants(), variant.root is already suffixed (for example GLM-5.2-high), so this computes baseId as the variant id rather than the original base GLM-5.2. The following modelMap.get(baseId) misses, which means every newly exposed effort option falls back to the raw id as its label and loses the base model's supported endpoints, context length, output limit, and thinking flag.

Useful? React with 👍 / 👎.

Probe Test and others added 2 commits July 22, 2026 17:46
)

appendSyncedEffortVariants sets a variant's own root field to
${baseRoot}-${tier} (still tier-suffixed), not the true base model id.
buildModelOptions() was deriving baseId from variant.root, so the lookup
into modelMap never matched and every <model>-<tier> variant silently
fell back to bare defaults instead of inheriting contextLength,
outputTokenLimit, supportedEndpoints, and supportsThinking from its
base model.

Track each variant's true base raw id directly while iterating tiers
during catalogShaped construction instead of re-deriving it from
variant.root.

Adds a regression test seeding a synced model with
supportedThinkingEfforts via replaceSyncedAvailableModelsForConnection
and asserting the resulting <model>-<tier> variants both appear and
inherit the base entry's metadata through getComboBuilderOptions().

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw
diegosouzapw merged commit 13a7a32 into diegosouzapw:release/v3.8.49 Jul 22, 2026
5 checks passed
@diegosouzapw

Copy link
Copy Markdown
Owner

Obrigado, @Dingding-leo — mergeado na release/v3.8.49. Validado no tip combinado (typecheck + file-size + 37 testes das áreas tocadas verdes). Único red de CI era o base-red compartilhado de complexity, pré-existente na tip.

@diegosouzapw diegosouzapw mentioned this pull request Jul 23, 2026
korvin2000 pushed a commit to korvin2000/OmniRoute that referenced this pull request Aug 2, 2026
GET /v1/models was assembled by many independent push loops (auto-combos,
named combos, static registry, codex-native, synced, OpenRouter, specialty,
custom, alias-backed, connection-fallback), so one provider's models landed in
several separated, interleaved blocks. Apply ONE stable, provider-grouped sort
at serialization in finalizeCatalogResponse, keyed by owned_by (canonical owner
identity) rather than the model-id prefix — so a single routable public prefix
that differs from its owner (e.g. no-auth OpenCode publishing oc/<model> while
keeping owned_by "opencode") stays contiguous.

Combos are pinned first (preserving diegosouzapw#4164); then providers in registry
precedence (OAuth -> NoAuth -> API-key); then unknown providers in
locale-independent code-unit order. The sort is stable and pure (reorders rows
only, no mutation, no DB/IO), preserving combo sort_order, connection priority,
custom append-order, and equal-id audio twins. Identity, alias mapping, effort
variants, dedupe, and Claude-mirror gating are untouched.

This is the one enumerated Model-Identity behavior with no upstream equivalent
on release/v3.8.50: single public prefix / UUID-leak (diegosouzapw#8327/diegosouzapw#8361) and Combo
Builder effort variants (diegosouzapw#8072/diegosouzapw#8165) are already merged there.
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
… model picker (diegosouzapw#8072) (diegosouzapw#8165)

* fix(combos): expose synced reasoning-effort variants in Combo Builder model picker (diegosouzapw#8072)

Synced reasoning-effort aliases (e.g. GLM-5.2-high, GLM-5.2-medium)
appear in the catalog and Playground but were missing from the Combo
Builder's inline model picker. buildModelOptions() added base synced
records but never ran appendSyncedEffortVariants().

Convert synced models with non-empty supportedThinkingEfforts into
catalog-shaped entries, run the shared appendSyncedEffortVariants
utility (preserving its effort normalization, provider exclusions,
suffix-collision handling, and naming behavior), and add any new
variant ids to the builder model map. Variants inherit the base
model's endpoints, context length, output limit, and thinking support.

* fix(combos): correct baseId derivation for synced effort variants (diegosouzapw#8072)

appendSyncedEffortVariants sets a variant's own root field to
${baseRoot}-${tier} (still tier-suffixed), not the true base model id.
buildModelOptions() was deriving baseId from variant.root, so the lookup
into modelMap never matched and every <model>-<tier> variant silently
fell back to bare defaults instead of inheriting contextLength,
outputTokenLimit, supportedEndpoints, and supportsThinking from its
base model.

Track each variant's true base raw id directly while iterating tiers
during catalogShaped construction instead of re-deriving it from
variant.root.

Adds a regression test seeding a synced model with
supportedThinkingEfforts via replaceSyncedAvailableModelsForConnection
and asserting the resulting <model>-<tier> variants both appear and
inherit the base entry's metadata through getComboBuilderOptions().

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: Austin Liu <austinliu@Austins-MacBook-Air-3.local>
Co-authored-by: Probe Test <probe@example.com>
Co-authored-by: Dingding-leo <Dingding-leo@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… model picker (diegosouzapw#8072) (diegosouzapw#8165)

* fix(combos): expose synced reasoning-effort variants in Combo Builder model picker (diegosouzapw#8072)

Synced reasoning-effort aliases (e.g. GLM-5.2-high, GLM-5.2-medium)
appear in the catalog and Playground but were missing from the Combo
Builder's inline model picker. buildModelOptions() added base synced
records but never ran appendSyncedEffortVariants().

Convert synced models with non-empty supportedThinkingEfforts into
catalog-shaped entries, run the shared appendSyncedEffortVariants
utility (preserving its effort normalization, provider exclusions,
suffix-collision handling, and naming behavior), and add any new
variant ids to the builder model map. Variants inherit the base
model's endpoints, context length, output limit, and thinking support.

* fix(combos): correct baseId derivation for synced effort variants (diegosouzapw#8072)

appendSyncedEffortVariants sets a variant's own root field to
${baseRoot}-${tier} (still tier-suffixed), not the true base model id.
buildModelOptions() was deriving baseId from variant.root, so the lookup
into modelMap never matched and every <model>-<tier> variant silently
fell back to bare defaults instead of inheriting contextLength,
outputTokenLimit, supportedEndpoints, and supportsThinking from its
base model.

Track each variant's true base raw id directly while iterating tiers
during catalogShaped construction instead of re-deriving it from
variant.root.

Adds a regression test seeding a synced model with
supportedThinkingEfforts via replaceSyncedAvailableModelsForConnection
and asserting the resulting <model>-<tier> variants both appear and
inherit the base entry's metadata through getComboBuilderOptions().

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: Austin Liu <austinliu@Austins-MacBook-Air-3.local>
Co-authored-by: Probe Test <probe@example.com>
Co-authored-by: Dingding-leo <Dingding-leo@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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.

fix(backend): synced reasoning-effort variants missing from Combo Builder model picker

3 participants