GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): read effort and system update flags from models.dev by rekram1-node · Pull Request #66717 · anomalyco/opencode

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Nov 27, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Issue for this PR

No issue. Found while reworking #66648.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

models.dev records per API whether a model takes effort changes (effort_updates) and system messages (system_updates) mid-conversation, but opencode never read either flag. #61492 gave the AI package matching capabilities (reasoning.updates, systemUpdates) and left filling them from the catalog for later; that step never landed. So every catalog model fell back to each route's model-ID guess (GPT-6+ on OpenAI Responses, Claude 5.x on Anthropic Messages), and routes without a guess, like the shared Open Responses route Copilot uses, never sent either.

This reads both flags from the model's API in models.dev:

models.dev api.<name>.capabilities
  effort_updates = true  → compatibility.supportsEffortUpdates → capabilities.reasoning.updates
  system_updates = true  → compatibility.supportsSystemUpdates → capabilities.systemUpdates
  unset or false         → nothing set, the route keeps its own detection
  • Only a yes on the model's API counts. An unset or false flag changes nothing, so no model loses support it has today. The model-wide system_updates isn't read: models.dev sets it for Chat Completions developer messages on many hosts that also list an Anthropic Messages API (Kimi, DeepSeek, Qwen, OpenRouter, Vercel), where it would turn on native system messages nobody tested.
  • New compatibility.supportsSystemUpdates, next to supportsEffortUpdates: models.dev fills it, and a config can override it per model. It is model-only, like supportsEffortUpdates. This is an additive public schema field (client, OpenAPI and cli-rs types regenerated or updated, docs updated).
  • tools.updates is left out on purpose. The routes act on it as soon as it's set: OpenAI Responses moves every tool into a leading additional_tools item and Anthropic sends tool changes in place. That changes the request shape for many models, so it should land on its own.

What changes with today's catalog (APIs where models.dev says yes and the route's guess says no):

Flag Newly on
effort_updates OpenAI GPT-5.6 on openai (Responses); GPT-5.6 and GPT-6 on GitHub Copilot once #66648 makes the Open Responses route honor it
system_updates MiniMax M3 and M3.1 Flash on MiniMax's Anthropic Messages API (4 providers)

Everything else marked yes is already on through the routes' guesses: GPT-6 on OpenAI, Azure, Cloudflare AI Gateway and Vercel; Claude on Anthropic, Bedrock and Copilot.

How did you verify your code works?

  • models.test.ts: effort_updates and system_updates set to true on the API set both compatibility flags; false leaves them unset.
  • model-resolver.test.ts: the compatibility flags reach the AI model as reasoning.updates and systemUpdates, and stay unset when the model has none.
  • bun run check passes. Full packages/ai suite passes. Full packages/core suite passes except two shell-scan tests that fail the same way on dev locally.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #59868

Public API: adds optional model compatibility.supportsSystemUpdates to the config schema, OpenAPI and client types (backwards compatible)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rekram1-node
fix(core): read effort and system update flags from models.dev
686effb
@rekram1-node rekram1-node mentioned this pull request Nov 27, 2026
fix(ai): keep the prompt cache when switching effort on Copilot GPT #66648
Merged
opencodejr[bot]
opencodejr Bot reviewed Nov 27, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

No problems found. This reads the per-API effort_updates/system_updates from models.dev into the model's compatibility, then into reasoning.updates/systemUpdates. Only an explicit true is passed on, so routes without the flag keep guessing from the model ID. I checked it with the touched core tests (all pass with the PR; the new cases fail on the base) and tsc in packages/core (passes; bun check isn't available in this environment). I couldn't run it end to end, since the flags only change what's sent to real providers.

Public API: adds the optional compatibility.supportsSystemUpdates (boolean, model-only, so it's also left out of the provider-level compatibility settings) to the schema, the OpenAPI spec, the client types and the cli-rs/Luau types. It's additive and backwards compatible; no existing config changes meaning.

One thing to keep in mind, not a blocker: the Bedrock Mantle messages route lets any explicit reasoning.updates skip its Opus 5.0 limit. So models.dev needs to keep effort_updates off for Opus 5.0 on Mantle, or those requests will be rejected.

Related: #59868

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rekram1-node
rekram1-node enabled auto-merge (squash) November 27, 2026 04:32
@rekram1-node
rekram1-node merged commit ace8a53 into dev Nov 27, 2026
14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node deleted the catalog-update-flags branch November 27, 2026 04:35
@rekram1-node rekram1-node mentioned this pull request Nov 27, 2026
fix(ai): pass effort and tool update support through routes built on shared protocols #66721
Merged
3 of 6 tasks
@simonklee simonklee mentioned this pull request Nov 27, 2026
fix(cli-rs): port provider order and the service.json refusal, and fix CI-only test races #66776
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rekram1-node
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.