feat(providers): complete Fable 5.1 support - #1284
Merged
Merged
Conversation
Align effort, thinking history, tool choice, output limits, and pricing with the published Fable 5.1 contract. Pre-commit hook ran. Total eslint: 0, total circular: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Fable 5.1 is already discoverable, but ORG2 inherits incompatible Fable 5 defaults: the fallback catalog offers
ultracode, plain side queries lose the selected effort, structured side queries send forced tool choices that 5.1 rejects, and edited/compacted histories can fail its thinking-signature check. Static metadata also understates maximum output and overstates cached-input pricing.Solution
low,medium,high,xhigh, andmax, retaining thehighdefault and authoritative live capability metadata. Savedultracodealiases remain readable and sendmax; no stored selections are deleted.drop_blockwith its required thinking-binding beta so the API can discard invalidated reasoning after system/tool/history changes. Preserve opaque signed blocks for provider validation, including empty visible summaries. Both response finalizers and the history converter previously dropped those valid blocks; the fix retains their signatures in the existing tool-call metadata format.tool/anychoices toautowith an explicit instruction appended for the current request. Existing side-query extraction, empty-result handling, and text fallback remain in place.Checked Anthropic's migration guide, effort reference, and model specifications/pricing.
Potential risks
drop_blocktrades invalid-prefix errors for lost prior reasoning; repeated history changes may increase token cost and latency. This PR does not redesign conversation persistence or measure live cache behavior.Verification
cargo test -p key_vault -p orgtrack_core --lib— 383 KeyVault tests and 592 OrgTrack tests passed; 8 existing OrgTrack tests ignored.pnpm test src/types/model/info.anthropic.test.ts src/util/__tests__/modelGrouping.test.ts src/util/__tests__/modelVariants.test.ts src/util/__tests__/formatModelName.test.ts— 71 passed.pnpm run typecheck:fast— passed for the whole frontend.pnpm exec eslint src/ --ext .ts,.tsx,.js,.jsx --format json— 6,432 files, zero errors or warnings.pnpm run check:circular— zero cycles across 6,528 modules.pnpm run check:test-placement— passed across 495 directories.git diff --check— passed. Reviewed the entire feature diff for unrelated changes, credentials, personal paths, generated files, and caches.cargo clippy -p agent_core -p key_vault -p orgtrack_core --all-targets -- -D warnings— passed.cargo test -p agent_core --lib providers::— 461 passed, including serialized auth/stream/effort matrices and raw JSON/SSE signed-history replay regressions.Architecture review
Covered all ten layers within this change: compilation; production call-chain wiring; naming; effort/model-version semantics; defaults and legacy aliases; provider ownership; readability; serialized HTTP bodies/headers; API/OAuth discovery parity; and symmetry across stream modes, auth modes, qualified ids, and neighboring models. Tests inspect requests built by
prepare_requestandapply_headers, including signed history, rather than only testing predicates. Broader FSM, database, React, and cloud-sync internals are outside this feature's scope. Live wire validation remains the limitation above.Performance review
Performance verdict: pass for the changed client resource lifecycle. No CPU, latency, or prompt-cache improvement is claimed; live provider performance remains unmeasured.