Skip to content

Expose which model settings are supported and how Dive applies them - #273

Open
myzie wants to merge 8 commits into
mainfrom
codex/model-capability-registry-design
Open

Expose which model settings are supported and how Dive applies them#273
myzie wants to merge 8 commits into
mainfrom
codex/model-capability-registry-design

Conversation

@myzie

@myzie myzie commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

What this does

Different model APIs accept different controls for reasoning and temperature, and they often interpret the same setting differently. Dive already handles those differences when it builds requests. Until now, an application that wanted to show valid settings or validate a configuration had to copy those provider rules and keep them in sync.

This PR makes that behavior available directly from Dive, without sending a network request.

Applications can now ask three practical questions:

  • Providers() — Which provider packages have registered model information in this program?
  • ClassificationFor(provider, model) — Which controls are supported by this exact model from the provider catalog, and on which API was that information verified?
  • Explain(provider, config) — What will Dive do with these requested settings before it builds the provider request?

For a concrete configuration, Explain can report that Dive will:

  • use a reasoning effort or token budget as requested;
  • reduce a value to the range the model accepts;
  • turn an effort level into a reasoning token budget when the provider has no matching effort control;
  • use provider-controlled adaptive thinking when a manual budget is unavailable;
  • leave out a setting, such as temperature, when it cannot be used with the other requested controls; or
  • reject an Anthropic configuration that combines thinking with a prefilled assistant response or a forced tool choice.

The result also includes the final, provider-neutral settings that request construction will use.

How it stays accurate

Explain uses the same provider code that real request construction uses. It is not a second compatibility table with a separate set of rules.

Published support is intentionally limited to exact model IDs in each provider catalog. A future model, fine-tune, gateway model, or custom deployment does not inherit a published guarantee just because its name shares a prefix with a known model.

Verification is tied to the API that was actually tested. For example, evidence from Vertex AI is not presented as evidence for the public Gemini API.

This PR includes model information for OpenAI, Grok, Anthropic, and Google.

What does not change

This is an additive inspection API. Existing request behavior remains the same:

  • known models are still adjusted, translated, or have unsupported settings omitted as before;
  • unknown, custom, gateway, and deployment model IDs still use the existing permissive runtime behavior; and
  • normal provider request paths do not depend on the inspection registry.

The PR also includes the reviewed design document, a usage guide, a documentation index entry, a changelog entry, and tests that confirm the explanation matches real request construction.

Validation

All local checks passed:

  • make check
  • go test ./... in providers/openai
  • go test ./... in providers/google
  • go test ./... in providers/grok
  • go vet ./... in all three nested provider modules
  • go test -race ./providers/modelcaps
  • git diff --check origin/main...HEAD

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in: 8 minutes

Limit details: You’ve used the included review currently available. Your 74 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

You’re in a promotional period — use the checkbox below to run this review for free:

  • Run review for free

On-demand reviews are free for the next 29 days. After that, they cost $0.25 per reviewed file.

How can I continue?

Run this review now using the option above, or comment @coderabbitai review --use-credits.

You can also wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6e1b7efa-7b00-4bf7-b3c6-c8de20ea6971

📥 Commits

Reviewing files that changed from the base of the PR and between eb9162d and 403b5b0.

📒 Files selected for processing (23)
  • CHANGELOG.md
  • docs/README.md
  • docs/design/model-capability-registry.md
  • docs/guides/model-control-classification.md
  • providers/anthropic/anthropic.go
  • providers/anthropic/capabilities.go
  • providers/anthropic/capabilities_register.go
  • providers/anthropic/capabilities_registry_test.go
  • providers/anthropic/capabilities_test.go
  • providers/google/capabilities_register.go
  • providers/google/capabilities_registry_test.go
  • providers/google/google.go
  • providers/google/thinking_test.go
  • providers/grok/capabilities_register.go
  • providers/grok/capabilities_test.go
  • providers/internal/responsescontrol/plan.go
  • providers/modelcaps/modelcaps.go
  • providers/modelcaps/registry.go
  • providers/modelcaps/registry_test.go
  • providers/openai/capabilities_register.go
  • providers/openai/capabilities_test.go
  • providers/openai/provider.go
  • providers/openai/reasoning.go

Comment @coderabbitai help to get the list of available commands.

@myzie myzie changed the title Add exact model control classification and planning Expose which model settings are supported and how Dive applies them Aug 22, 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.

1 participant