Skip to content

fix(agent): populate primary model from models fallback array (#121) - #124

Open
warun7 wants to merge 1 commit into
OpenRouterTeam:mainfrom
warun7:fix/server-tools-model-fallback
Open

fix(agent): populate primary model from models fallback array (#121)#124
warun7 wants to merge 1 commit into
OpenRouterTeam:mainfrom
warun7:fix/server-tools-model-fallback

Conversation

@warun7

@warun7 warun7 commented Sep 4, 2026

Copy link
Copy Markdown

Fixes #121.

Summary

  • Populated model from models[0] across callModel, resolveAsyncFunctions, and ModelResult when model is omitted.
  • OpenRouter server tools (and backend request processors) require the primary model property on incoming requests.
  • Synchronized model and models in buildNextTurnParamsContext and applyNextTurnParamsToRequest.
  • Preserved explicit model when provided alongside models.
  • Added unit tests for server tools with models fallback, explicit model preservation, and async models functions.
  • Added changeset.

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.

Server Tools fail when using model fallback via models

1 participant