Skip to content

fix(host-agent): verify opencode provider npm, model name, and output limit - #2646

Open
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:oc2-fix/opencode-verify-complete
Open

fix(host-agent): verify opencode provider npm, model name, and output limit#2646
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:oc2-fix/opencode-verify-complete

Conversation

@patil2001

Copy link
Copy Markdown
Contributor

Summary

_opencode_config_matches only compared model/small_model, baseURL, apiKey, and limit.context, so a wrong provider package, served name, or a clamped output limit went undetected before apply was declared stable.

Change

It now also verifies the provider npm is @ai-sdk/openai-compatible, the model name matches the routed display name when provided, and limit.output is at least min(32768, context_length).

Test plan

  • Ran host-agent with a mismatched provider package and confirmed the apply path now flags it.

… limit

_opencode_config_matches only compared model/small_model, baseURL, apiKey,
and limit.context, so a wrong provider package, served name, or a clamped
output limit went undetected before apply was declared stable. It now also
verifies the provider npm is @ai-sdk/openai-compatible, the model name
matches the routed display name when provided, and limit.output is at least
min(32768, context_length).
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.

1 participant