Repository navigation
fix: publish truthful Anthropic fixed and tiered pricing - #143
Merged
Merged
Conversation
Add standard Decimal pricing, cold budget recognition preserving the existing 1M-context policy, and reject forced tool choice after expert wire overrides for the exact fixed model. Preserve other model behavior. Focused regressions: 195 passed. Full maintained offline suite: 23 failed, 2549 passed, 1 deselected; offline-isolation child launch audit blocker. No live or DTU qualification; unresolved correctness bot is not passed. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This was referenced Nov 14, 2026
Merged
Brian Krabach (bkrabach)
marked this pull request as ready for review
November 14, 2026 17:34
6 tasks
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.
Summary
Actual geography
Recognized actual usage.inference_geo governs; absent/None may use an explicit valid effective final-wire value including extra_body precedence. Invalid nonnull actual stays unknown. Missing both modern geo-capable models remains unknown, not assumed global: omission uses workspace default, which can be US. Legacy geo-incapable priced models retain standard. Optional SSE delta actual geography is retained when SDK1.12 accumulator omits it. Request defaults/routing unchanged; standalone helper retains documented global default.
Sources: https://platform.claude.com/docs/en/manage-claude/data-residency.md and SDK1.12 Usage/message_create_params. US1.1 stacks across all token categories and confirmed fast2x. Rates https://platform.claude.com/docs/en/about-claude/pricing.md verified2026-11-14. These are standard first-party token charges, not invoices, discounts or separate server-tool fees.
Actual review repairs
Astra review of6bbd55 required started-stream cost completeness and raw invalid-speed validation; Fable independently noted same invalid speed issue. Now each streamed attempt is marked potentially billable on first SDK event. Failure/cancellation before accounting records unknown exactly once; later retry success cannot hide it. A local recorder clears marker precisely at conversion accounting, so later hook failure cannot double count. No provider-shared request marker/concurrency change. Raw response speed now reaches existing cost validator rather than coercing nonstrings to None. Optional actual None still means absent normal standard speed.
Frozen candidate and verified CI
Current clean head abac0d2.
PASS all6 maintained CI jobs Linux/macOS/Windows x Python3.11/3.12 plus CLA: https://github.com/microsoft/amplifier-module-provider-anthropic/actions/runs/43620178156 . Ubuntu3.12:2647passed,1deselected,48warnings in53.37s. AST/diff-check pass. Offline inventory explicitly does not qualify required real vision.
Initial review-repair CI8a8896c had1testfixturefailure/2646passed: assigning RustHookRegistry.emit is read-only. Fixed by injecting only provider hook boundary while keeping mounted contribution real; no skip/deselection or production change. Exact new production hash init.py49344afc26c71dd4ad37f009168c02f2380eb6dc3bfce026e4804d13b97f327f; _cost.pyce2493fb872cf59f45643b41bb0a2efbdd9261f0a9c6536c2279a0655cbd7ebf.
Tests and retained history
Real SDK transport-only interruption after start/output, first/after known cost, explicit cancellation, retry-success-still-unknown, conversion failure, successful conversion followed by hook failure, validation/rejection nonpoisoning; SDK invalid speed/no-fast-request and session unknown. Existing full retry/wait/normal regressions run unchanged. Earlier tier/geography tests retain thresholds99999/100000/100001, high-tier output/cache crossing, mixedTTL, SDK absent/zero/mismatch, streaming/nonstream event JSON, actual/request geography disagreement and final delta, session known/unknown/zero.
Previous6bbd55 full6CI PASS2631; previous5354696 full6CI PASS2606 and DTU owner reported focused/full/cache/vision evidence. These remain prior-head proof, not silently new-head acceptance. Earlier authoring import/old-policy/oldCore fixture failures retained and repaired without deselection. Writer managed-isolation snapshot failed before execution/not-started; no test result or replay claimed.
Remaining acceptance hold
Parent-owned existing DTUs handle exact installed/source hashes and affected new-head tests (stream cost completeness/pricing metadata/retry/wait), modern Core and Unified/CLI/Agent integration, plus applicable live evidence reuse/qualification. Targeted Astra/Fable closure on repaired exact diff remains parent-owned. Keep draft until parent acceptance. Writer has not merged, closed141, touched Core, launched DTU or made paid calls. Metadata/rates/geography schema unchanged by final review repairs.