mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-05 06:33:49 +00:00
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. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| lib | ||
| provider | ||
| adapter.test.ts | ||
| auth-options.types.ts | ||
| auth.test.ts | ||
| cache-policy.test.ts | ||
| continuation-scenarios.ts | ||
| endpoint.test.ts | ||
| executor.test.ts | ||
| exports.test.ts | ||
| generate-object.test.ts | ||
| llm.test.ts | ||
| provider.types.ts | ||
| recorded-golden.ts | ||
| recorded-runner.ts | ||
| recorded-scenarios.ts | ||
| recorded-test.ts | ||
| recorded-utils.ts | ||
| recorded-websocket.ts | ||
| route.test.ts | ||
| schema.test.ts | ||
| tool-runtime.test.ts | ||
| tool-stream.test.ts | ||
| tool.types.ts | ||