opencode/packages/opencode
Aiden Cline f7dcfc2680 feat: drive reasoning variants from models.dev reasoning_options
Parse the curated reasoning_options field from models.dev api.json and use
its effort values to generate reasoning variants instead of the hardcoded
per-package tables, in both the v1 provider catalog and the v2 catalog plugin.

- core: ModelsDev.ReasoningOption discriminated union (toggle | effort |
  budget_tokens); effort values stay open strings and unknown option types
  are tolerated since api.json is cast, not decoded
- core: ReasoningVariants shared per-package effort encoder used by v1
  ProviderTransform.variants and the v2 ModelsDevPlugin
- core: v2 catalog generates effort variants from reasoning_options;
  curated experimental modes win id collisions; anthropic profile gains
  the effort semantic
- llm: anthropic protocol supports adaptive thinking, lowers effort to
  output_config.effort, and sends the effort-2025-11-24 beta header
- opencode: resolved Provider.Model carries capabilities.reasoningOptions
  (unknown types and null effort values dropped at the mapping boundary);
  config models accept reasoning_options; models without usable effort
  data fall back to the hardcoded tables unchanged

Catalog-wide audit vs live api.json: 2975 models byte-identical, 38 diffs,
all data correcting stale hardcoded effort lists.
2026-06-09 17:21:11 -05:00
..
bin fix(cli): forward signals from npm shim (#26259) 2026-05-08 14:00:51 -05:00
migration/20260511173437_session-metadata refactor(core): move database schema ownership (#29068) 2026-05-30 21:08:38 -04:00
script chore: generate 2026-06-09 18:30:51 +00:00
specs refactor(core): consolidate filesystem services (#30447) 2026-06-02 16:09:26 -04:00
src feat: drive reasoning variants from models.dev reasoning_options 2026-06-09 17:21:11 -05:00
test feat: drive reasoning variants from models.dev reasoning_options 2026-06-09 17:21:11 -05:00
.gitignore Load models.dev snapshot from build global (#28077) 2026-05-17 21:59:44 -04:00
AGENTS.md refactor(core): move database schema ownership (#29068) 2026-05-30 21:08:38 -04:00
bunfig.toml tui plugins (#19347) 2026-03-27 15:00:26 +01:00
Dockerfile add ARM64 Docker image support (#5483) 2025-12-13 13:01:59 -06:00
git feat: interactive update flow for non-patch releases (#18662) 2026-03-22 23:12:40 +00:00
package.json refactor(core): simplify location filesystem (#31545) 2026-06-09 14:28:45 -04:00
parsers-config.ts refactor(server): canonicalize service API (#31049) 2026-06-07 03:27:28 +00:00
README.md sync 2025-05-30 20:48:36 -04:00
sst-env.d.ts zen: update sst version 2026-02-18 13:54:23 -05:00
tsconfig.json refactor(server): canonicalize service API (#31049) 2026-06-07 03:27:28 +00:00

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.