Skip to content

Normalize provider-backed model updates#714

Merged
jaberjaber23 merged 1 commit intoRightNow-AI:mainfrom
CastleOneX:pr/provider-model-normalization
Mar 20, 2026
Merged

Normalize provider-backed model updates#714
jaberjaber23 merged 1 commit intoRightNow-AI:mainfrom
CastleOneX:pr/provider-model-normalization

Conversation

@CastleOneX
Copy link

Summary

  • resolve display names and aliases to canonical model IDs when spawning or updating agents
  • keep provider-specific �pi_key_env hints in sync when switching providers
  • route explicit provider/model updates through kernel-side normalization instead of mutating the registry directly

Why

Some provider switches left stale auth hints behind, and some UI-visible labels such as Grok 4.20 were being treated as raw model IDs. That caused valid provider/model changes to fail in the daemon even though the selected model existed in the catalog.

Validation

  • cargo check -p openfang-runtime -p openfang-kernel -p openfang-api -j 1

Resolve catalog display names and aliases to canonical model IDs when spawning or updating agents, keep provider-specific api_key_env hints in sync when switching providers, and route explicit provider model changes through kernel model normalization instead of directly mutating the registry. This fixes cases like xAI agents carrying stale OpenAI auth hints or UI labels such as 'Grok 4.20' being treated as raw model IDs.

(cherry picked from commit 51ee6a5a927208ab0301a29fd2e40b29c9dfaf7d)
Copy link
Member

@jaberjaber23 jaberjaber23 left a comment

Choose a reason for hiding this comment

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

Solid fix. Catalog normalization now happens consistently through set_agent_model(). Display-name matching in find_model() is a good addition. Test coverage adequate.

@jaberjaber23 jaberjaber23 merged commit a125470 into RightNow-AI:main Mar 20, 2026
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.

2 participants