Skip to content

fix: include unmapped models in recommended list#8336

Open
Bahtya wants to merge 1 commit intoaaif-goose:mainfrom
Bahtya:fix/unmapped-models-available
Open

fix: include unmapped models in recommended list#8336
Bahtya wants to merge 1 commit intoaaif-goose:mainfrom
Bahtya:fix/unmapped-models-available

Conversation

@Bahtya
Copy link
Copy Markdown

@Bahtya Bahtya commented Apr 6, 2026

Summary

Fixes #8321

Previously, models not found in CanonicalModelRegistry were silently dropped from the recommended models list. This made newly released models (e.g. claude-opus-4-6-thinking, gemini-3.1-pro, OpenRouter models) invisible in the UI dropdown, forcing users to type model names manually.

Fix

In fetch_recommended_models(), when map_to_canonical_model() returns None (model not in registry), include the model anyway with None as its release date. Unmapped models are sorted after dated models in the dropdown.

Before: Unmapped models silently dropped → not selectable in UI
After: All models from provider's /v1/models endpoint are available

Changes

  • crates/goose/src/providers/base.rs: Changed filter_map to include unmapped models instead of silently dropping them (10 lines added, 1 removed)

Testing

The fix preserves existing behavior for mapped models (sorted by release date) while adding unmapped models at the end of the list.

Copy link
Copy Markdown

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

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: ebbf6ddf89

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +613 to +617
None => {
// Unmapped model — include it anyway so new/unknown models
// are available in the UI dropdown.
return Some((model.clone(), None));
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve capability checks for unmapped models

Returning Some((model.clone(), None)) here causes unmapped models to skip the later text-modality and tool-callability filters, so they are treated as recommended even when they are not usable for Goose chat/tool flows. This is a regression for providers that list mixed model types from their catalog endpoints (for example, google.rs fetches all v1beta/models entries, and openai.rs collects every /v1/models id): previously those unmapped entries were excluded when mapped usable models existed, but now unsupported image/audio/video models can appear in the dropdown and fail with 4xx when selected for normal chat requests.

Useful? React with 👍 / 👎.

@michaelneale
Copy link
Copy Markdown
Collaborator

this seems reasonable to me. Any reason why not @DOsinga as I am sure we have gone back and forth on this. @Bahtya mind signing the SCO so can get the build clean? thanks!

@Bahtya Bahtya force-pushed the fix/unmapped-models-available branch from ebbf6dd to d403be7 Compare April 6, 2026 11:53
@Bahtya
Copy link
Copy Markdown
Author

Bahtya commented Apr 6, 2026

Thanks @michaelneale! I've amended the commit with the DCO sign-off and force-pushed. Let me know if there's anything else needed.

1 similar comment
@Bahtya
Copy link
Copy Markdown
Author

Bahtya commented Apr 6, 2026

Thanks @michaelneale! I've amended the commit with the DCO sign-off and force-pushed. Let me know if there's anything else needed.

Previously, models not found in CanonicalModelRegistry were silently
dropped from the recommended list, making new models (e.g. claude-opus-4-6,
gemini-3.1-pro) invisible in the UI dropdown.

Now, unmapped models are included in the list without a release date,
sorted after dated models. This allows users to select any model returned
by the provider's /v1/models endpoint.

Fixes aaif-goose#8321

Signed-off-by: bahtya <bahtyar153@qq.com>
@DOsinga DOsinga added the needs_human label to set when a robot looks at a PR and can't handle it label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs_human label to set when a robot looks at a PR and can't handle it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goose silently drops unmapped models from /v1/models, breaking OpenRouter, OmniRoute, and cutting off new models

3 participants