Skip to content

feat(catalog): add decision-model wire protocols and decisions-only models - #349

Draft
birdayz wants to merge 29 commits into
mainfrom
jb/decision-models
Draft

birdayz wants to merge 29 commits into
mainfrom
jb/decision-models

Conversation

@birdayz

@birdayz birdayz commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Catalog support for decision models: three decisions wire protocols, the Decisions API on gpt-6-luna, and two decisions-only models (gemini-decision-1 and Fireworks rune).

Changes

  • Wire protocols openai_decisions, gemini_decisions and typesafe_systemone; an offering whose wire APIs are all decisions protocols is decisions-only
  • A decisions-only entry must declare MaxOutputTokens 0, a RateFree output rate and no output modality; generative entries keep today's rules
  • Every catalog-backed provider constructor refuses a decisions-only offering with catalog.ErrDecisionsOnly, because cloudv2's agent admission relies on NewModel failing for a model that cannot run an agent
  • Snapshot schema v4: a decisions-only offering has max_output_tokens 0 and an empty modalities.output, so consumers must not read 0 as missing metadata or assume an output modality
  • gpt-6-luna keeps its rate card: Decisions bills the same input and cache rates and reports zero output tokens
  • The reconcile bot is unchanged: an unattended run still skips a decisions-only model as not_callable, and a person adds one in a reviewed PR
  • Fireworks is recorded as Rune's publisher, which adds a fireworks leg to the reconcile workflow. Fireworks' model page names Fireworks as Provider and lists the Hugging Face repository surogate/rune-26b-a4b-GGUF
  • Catalog only: the SDK gets no decisions client

References

@birdayz

birdayz commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

bruh code review: ACK

2e2f5648416a · 3 open findings · blocking severity: medium

Spend: 7 min · 10.1M tokens (10.0M input, 94% cached, 108k output) · 4 agents, 103 model calls

Open findings:

  • LOW README still excludes US-only capacity, but catalogued Rune runs on US capacity · intent/docs · providers/fireworks/README.md:34 · thread
  • LOW Expected binding now computed by the helper under test · tests/vacuity · providers/fireworks/provider_test.go:74 · thread
  • NIT Publisher evidence cites an unresolvable 'rune.md' · maintainability/comments · catalog/facts_data.go:195 · thread
Lenses
Lens Reviewer Files Notes
correctness claude-code-sdk/default/claude-fable-5-2[1m] high 57 No findings. Traced decisions-only validation and normalization in catalog.New, PriceTier, the snapshot v4 encoding, the ErrDecisionsOnly refusal in all seven catalog-backed constructors (including the exported anthropic/google NewModelFromOffering), Fireworks' first-generative-binding selection, and the new fireworks reconcile leg through the workflow, catalog-gate page loading and catalog-report offering naming; go test -short ./catalog/... ./cmd/... ./internal/... ./providers/... passes at the reviewed commit. The earlier open finding (cmd/catalog-snapshot/fireworks_inventory_test.go:103) is fixed: the withheld case now checks only the reason and no longer asserts the ID is absent from the catalog. Not verified: the content of the external vendor pages behind the new gate must_contain strings, and key-gated live/integration tests, which were not run.
intent claude-code-sdk/default/claude-fable-5-2[1m] high 57 Every description claim is backed by the diff: the three decisions protocols, decisions-only validation, ErrDecisionsOnly in all seven catalog-backed constructors (openaicompat has no catalog), schema v4, the unchanged gpt-6-luna rate card, the not_callable rule plus tripwire test, and the fireworks reconcile leg; the Rune page does show Provider Fireworks and Hugging Face surogate/rune-26b-a4b-GGUF (fetched 2026-11-22). The earlier open finding at cmd/catalog-snapshot/fireworks_inventory_test.go:103 is fixed by 26132d3. One low docs finding: the Fireworks README still puts US-only capacity outside the catalogue's contract while the newly catalogued Rune runs on US capacity per the pricing page the entry cites. Ran at the reviewed commit: go build ./... and go test -short on catalog, catalog/snapshot, cmd/catalog-snapshot, cmd/catalog-report, internal/reconcile and the anthropic, bedrock, fireworks, google, meta, openai and vertex provider packages, all passing; golangci-lint, task catalog:check, the examples build and live tests were not run.
maintainability claude-code-sdk/default/claude-fable-5-2[1m] high 57 One nit: an unresolvable 'rune.md' citation in the comment that justifies Rune's publisher. The earlier open finding (providers/fireworks/provider.go:143, error naming the 'first Fireworks wire API') is fixed: both messages now say 'first generative'. Swept the reviewed tree for statements the change could have made false (output limit and rate rules, text-only modality default, schema version, first-binding selection, 'Fireworks is only a host', vendor and protocol lists) and found no stale site; catalog/snapshot.json matches the authored entries by reading, regeneration was not run.
tests claude-code-sdk/default/claude-fable-5-2[1m] high 57 Every behaviour the change adds has a test that fails with it reverted: protocol classification, the three decisions-only validation rules, output-modality normalization, the input-only price tier, schema v4 encoding, each constructor's refusal (the zero-value-provider tests would hit a different error or build a model without the guard), the Fireworks decisions-binding skip, and the new fireworks reconcile run (TestChainHasOneLegPerVendor, TestEveryPublisherIsTracked, TestFireworksRunPrefixesItsOwnOfferings). The new and touched tests pass at the reviewed commit under -short. The earlier open finding on cmd/catalog-snapshot/decisions_only_test.go:89 no longer holds: RULES.md (model-not-callable and the Decisions-only check), the add-model skill and the test's own comment now state that an unattended run leaves decisions-only models out, so the pinned list is the claimed behaviour, not a conflict with it. One low finding remains: a Fireworks runtime test now derives its expected binding from the production helper.

History:

  • 2026-11-22 03:00 UTC · a76a53c74cb4 · NAK · 3 new, 0 fixed, 0 still open
  • 2026-11-22 03:58 UTC · 6df1ccf2f0ec · NAK · 4 new, 3 fixed, 0 still open
  • 2026-11-22 04:08 UTC · 093698da48a8 · NAK · 5 new, 4 fixed, 0 still open
  • 2026-11-22 04:25 UTC · be7da916a44b · NAK · 4 new, 5 fixed, 0 still open
  • 2026-11-22 04:38 UTC · 2e2f5648416a · ACK · 3 new, 4 fixed, 0 still open

@birdayz birdayz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bruh code review: 3 new findings on a76a53c74cb4 — see the summary.

Comment thread catalog/wire.go Resolved
Comment thread catalog/wire.go Resolved
Comment thread providers/fireworks/provider_test.go Resolved

@birdayz birdayz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bruh code review: 4 new findings on 6df1ccf2f0ec — see the summary.

Comment thread catalog/snapshot/snapshot.go Resolved
Comment thread catalog/wire_test.go Resolved
Comment thread catalog/facts_data.go Resolved
Comment thread providers/openai/provider.go Resolved

@birdayz birdayz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bruh code review: 5 new findings on 093698da48a8 — see the summary.

Comment thread .claude/skills/add-model/SKILL.md Resolved
Comment thread .claude/skills/add-model/SKILL.md Resolved
Comment thread .github/reconcile-models/RULES.md Resolved

@birdayz birdayz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bruh code review: 4 new findings on be7da916a44b — see the summary.

Comment thread providers/fireworks/provider.go Resolved

@birdayz birdayz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

bruh code review: 3 new findings on 2e2f5648416a — see the summary.

`WithMaxTokens` defaults to a bounded 4096 tokens (including reasoning), capped at the offering's output limit. Temperature is validated against the offering's range. `WithReasoningEffort` accepts only the selected binding's exact list; DeepSeek `none` maps to disabled thinking on Messages/Chat. MiniMax exposes `WithThinking(true)` for adaptive thinking and `WithThinking(false)` to disable it, without invented budgets or Claude-specific controls. MiniMax Messages with explicit `WithThinking(false)` reports `StructuredOutput == false` and rejects schema requests before HTTP: native testing observed broken schema enforcement with that combination. Omit the thinking override or use adaptive thinking for schema output; both configurations passed actual SDK tests in both modes. The native catalog/API schema capability remains true. Foreign `Request.Options` are rejected rather than silently ignored; configure these controls at model construction. Responses always sends `store: false`. No automatic Anthropic cache markers are added; authoritative native cache usage is preserved. Priority, speed, thinking budgets, top-p, stop controls, and provider-hosted tool search are not exposed by this runtime.

Resolution is exact, including exact authored aliases. An unlisted date suffix, deployment, router, shorthand, or `*-latest` alias must not inherit the base model's API support or price. No moving aliases are currently registered. Router variants, US-only capacity, custom/private/fine-tuned deployments, batch, embeddings, and decision-only models are outside this catalog's supported contract. Messages support does not advertise native count-tokens: the observed `/inference/v1/messages/count_tokens` endpoint returned 404. Hosted `ToolSearchProtocol` remains empty; ordinary tools and Fireworks' client-side deferred-tool compatibility do not establish provider-hosted tool execution.
Resolution is exact, including exact authored aliases. An unlisted date suffix, deployment, router, shorthand, or `*-latest` alias must not inherit the base model's API support or price. No moving aliases are currently registered. Router variants, US-only capacity, custom/private/fine-tuned deployments, batch and embeddings are outside this catalog's supported contract. Rune 26B-A4B (`ModelRune`) is catalogued decisions-only, for discovery and pricing: its `WireAPIs` are `typesafe_systemone` (`/inference/v1/systemone`) and `openai_decisions` (`/inference/v1/decisions`), its per-API records withhold every generative feature, and `NewModel` refuses it with `catalog.ErrDecisionsOnly`. This SDK has no decisions client. Messages support does not advertise native count-tokens: the observed `/inference/v1/messages/count_tokens` endpoint returned 404. Hosted `ToolSearchProtocol` remains empty; ordinary tools and Fireworks' client-side deferred-tool compatibility do not establish provider-hosted tool execution.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LOW README still excludes US-only capacity, but catalogued Rune runs on US capacity (unverified)

The scope sentence the PR edits keeps "Router variants, US-only capacity, custom/private/fine-tuned deployments, batch and embeddings are outside this catalog's supported contract" and then, in the next sentence, catalogues Rune. The pricing section the Rune entry cites for its rates says Rune runs on US capacity. The same README and reconciliation.json withhold muse-spark-open for exactly that property (us_only_capacity), whose pricing note has the same shape (US capacity, no premium charged). After this PR the record says US-only capacity is out of scope while an in-scope offering is served that way, and nothing in the entry comment, README, hosts/fireworks.md or the PR description records Rune's capacity or why it is an exception. A reader, or a reconcile run deciding muse-spark-open or the next US-capacity model, gets two contradictory precedents. Uncertainty: the page says "US capacity" for Rune and "US-only capacity" for Muse Spark Open; I could not confirm whether Fireworks means a different thing by the two wordings, hence low.

Fix:

Record Rune's US capacity in the README scope sentence and the entry's source comment, and either narrow the exclusion to US-only variants that have their own ID and price beside a global offering, or state why Rune is the exception to it.

Evidence

providers/fireworks/README.md:34 ("Router variants, US-only capacity, ... are outside this catalog's supported contract. Rune 26B-A4B (ModelRune) is catalogued decisions-only ..."); providers/fireworks/README.md:62 ("muse-spark-open | Published rates but US-only capacity; deferred deployment/billing surface"); providers/fireworks/README.md:70 ("US-only variants not returned in the default listing | Separate capacity and prices; deferred"); providers/fireworks/testdata/discovery/reconciliation.json:25 (muse-spark-open withheld, reason us_only_capacity); providers/fireworks/models.go:123-125 cites https://docs.fireworks.ai/serverless/pricing.md, Decision models, for Rune's rates. That page, fetched 2026-11-22, line 69: "Rune runs on US capacity. There is no US-capacity premium, so the rates above are what you pay." and line 57: "Muse Spark Open runs on US-only capacity. The 50% US-only premium is waived, so the rates in that row are what you pay."

intent/docs · lens intent · F1

Comment on lines +73 to +74
api, ok := firstGenerativeWireAPI(offering)
require.True(t, ok)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LOW Expected binding now computed by the helper under test (unverified)

TestRuntimeMetadataIsSelectedAndNotCatalogMutation used to take its expected binding from the catalog (api := offering.WireAPIs[0]) and now takes it from firstGenerativeWireAPI(offering), the same function newModelFromOffering uses to select the binding. The capability, reasoning-effort and SupportedParams assertions that follow therefore compare the factory against its own selection: a regression in the helper that picks a different binding for a real catalogue offering moves expectation and result together, and the walk over the real catalogue stays green. Impact is limited: TestFactoryRefusesDecisionsOnlyOfferings pins skip-not-select and no-fallback with literal bindings on synthetic offerings, so only a helper regression those two shapes miss gets through, which is why this is low.

Fix:

Compute the expectation in the test without the helper: i := slices.IndexFunc(offering.WireAPIs, func(a catalog.WireAPI) bool { return !a.Protocol.IsDecisions() }) and use offering.WireAPIs[i], or keep offering.WireAPIs[0] behind a require.False(t, offering.WireAPIs[0].Protocol.IsDecisions()).

Evidence

providers/fireworks/provider_test.go:73 api, ok := firstGenerativeWireAPI(offering); providers/fireworks/provider.go:137 api, ok := firstGenerativeWireAPI(offering) (same helper, defined at provider.go:222). Old line in the diff: api := offering.WireAPIs[0]. Independent pins: providers/fireworks/provider_test.go TestFactoryRefusesDecisionsOnlyOfferings (literal [decisions[0], responses, decisions[1]] and [decisions[0], gemini, responses] cases). No catalogued Fireworks offering mixes a decisions binding with a generative one today, so the literal WireAPIs[0] is still correct for every non-decisions-only offering.

tests/vacuity · lens tests · F2

Comment thread catalog/facts_data.go
Comment on lines +192 to +195
// https://fireworks.ai/models/fireworks/rune (read 2026-11-22): Metadata
// lists "Provider: Fireworks" and "Huggingface: surogate/rune-26b-a4b-GGUF".
// Only its meta description (the opening quote of rune.md) says "from
// Surogate".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

NIT Publisher evidence cites an unresolvable 'rune.md' (unverified)

The comment that justifies PublisherFireworks for Rune says the only source naming Surogate is "the opening quote of rune.md". No file of that name exists in the reviewed tree and no URL is given for it, so a reader checking the publisher attribution (which is what adds the fireworks reconcile leg) cannot tell which document is meant. Every other citation in this comment and in the Rune entry is a full URL with a read date.

Fix:

Replace "rune.md" with the full URL of the document meant (for example the model page's .md export), or drop the parenthetical.

Evidence

catalog/facts_data.go:192-195: // https://fireworks.ai/models/fireworks/rune (read 2026-11-22): Metadata lists "Provider: Fireworks" and "Huggingface: surogate/rune-26b-a4b-GGUF". Only its meta description (the opening quote of rune.md) says "from Surogate". git grep -n 'rune\.md' 2e2f5648 returns this line only. Presumably the model page's markdown export; not confirmed.

maintainability/comments · lens maintainability · F3

This branch has not been deployed

No deployments
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