Skip to content

fix(model): include profile models in descriptor picker - #1361

Merged
kevincodex1 merged 2 commits into
Twigpine:mainfrom
hicap-oss:issue-1360-provider-profile-models
May 26, 2026
Merged

kevincodex1 merged 2 commits into
Twigpine:mainfrom
hicap-oss:issue-1360-provider-profile-models

Conversation

@jatmn

@jatmn jatmn commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes descriptor-backed /model pickers so they include models configured on the active provider profile, even when the provider's descriptor catalog or discovery results do not list every manually configured model.

This addresses #1360, where a Mistral profile configured with multiple comma- or semicolon-separated models only showed devstral-latest or the current first model in /model.

Why

Provider profiles already support model-list fields such as:

devstral-latest, mistral-medium-latest

However, descriptor-backed providers use optionsOverride in the /model command. That override was built only from the route catalog or discovered models, bypassing the active profile's configured model list. Mistral made this especially visible because its static descriptor catalog currently contains only devstral-latest.

What Changed

  • Added mergeActiveProfileModelOptions() to merge active profile-configured models into descriptor-backed /model options.
  • Deduplicates profile models against route catalog/discovery options by model value.
  • Scopes the merge so saved profile models are only included when the profile is actually applied and resolves to the same descriptor route currently shown.
  • Applies the merge on initial descriptor picker load, automatic/manual descriptor refresh, and /model refresh.
  • Added focused regression coverage for:
    • Mistral-style profile models being preserved when the Mistral profile is active.
    • Saved profile models not leaking into an unrelated env-selected descriptor route such as OpenRouter.

Provider Impact

Affected provider path:

  • Descriptor-backed /model provider routes, including Mistral.

Expected behavior:

  • Active profile models remain selectable even if static catalog/discovery omits them.
  • Existing catalog/discovery entries keep their labels and metadata.
  • Saved-but-inactive profile models are not shown for unrelated env-selected providers.

Validation

Ran:

bun test src/commands/model/model.test.tsx src/utils/model/routeCatalogOptions.test.ts
bun run build
git diff --check

Results:

  • Focused tests passed: 8 pass / 0 fail.
  • Build passed.
  • Diff whitespace check passed.

Also ran:

bun run typecheck

Result:

  • Failed on existing broad repo type errors unrelated to this branch, including missing module/type errors in bridge, plugin, session, and test files. This was not used as branch-specific validation.

Notes

This is intentionally a core /model descriptor/profile fix rather than a Mistral catalog-only change, because the same issue can affect any descriptor-backed provider whose catalog or discovery results do not include manually configured profile models.

@jatmn jatmn self-assigned this May 25, 2026
@jatmn jatmn added the bug Something isn't working label May 25, 2026
@kevincodex1
kevincodex1 merged commit 2c87bfe into Twigpine:main May 26, 2026
2 checks passed
@jatmn
jatmn deleted the issue-1360-provider-profile-models branch May 26, 2026 15:31
discopops pushed a commit to discopops/openclaude that referenced this pull request May 28, 2026
* fix(model): include profile models in descriptor picker

* fix(model): respect active profile model lists
Gravirei added a commit to Gravirei/openclaude that referenced this pull request May 28, 2026
- fix(autocompact): retry circuit breaker after cooldown (Twigpine#1375)
- fix(provider): require API key input when adding OpenGateway (Twigpine#1384)
- fix(provider): allow remote Ollama without OPENAI_API_KEY (Twigpine#952)
- fix(codex-stream): recover tool args delivered only via done events (Twigpine#1262)
- fix: route MiniMax compacting through Anthropic-compatible API (Twigpine#1154)
- fix(thinking): disable thinking for unsupported Ollama models (Twigpine#1376)
- feat(agents): set active session agent from agents menu (Twigpine#1349)
- fix(repl): show permission prompts while draft input is present (Twigpine#1393)
- fix(model): include profile models in descriptor picker (Twigpine#1361)
- Improve warning notice formatting (Twigpine#1415)
- fix(codex): allow credential storage fallback (Twigpine#1347)
- fix(attribution): make git attribution opt-in by default (Twigpine#1335)
- fix(agent): allow custom model overrides (Twigpine#1337)
- feat(query): robust multi-lingual and structural continuation nudge (Twigpine#1280)
- fix(watchers): debounce skills and settings reload bursts (Twigpine#1370)
- feat: configure API retry backoff (Twigpine#370) (Twigpine#1095)
- chore(main): release 0.15.0 (Twigpine#1325)
- ci: retrigger CodeQL after action download outage (Twigpine#1374)
- Fix launcher heap setup for long sessions (Twigpine#1242)
@chioarub chioarub mentioned this pull request Jun 2, 2026
11 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants