Skip to content

fix: publish truthful Anthropic fixed and tiered pricing - #143

Merged
Brian Krabach (bkrabach) merged 7 commits into
mainfrom
fix/anthropic-pricing-end-to-end
Nov 14, 2026
Merged

Brian Krabach (bkrabach) merged 7 commits into
mainfrom
fix/anthropic-pricing-end-to-end

Conversation

@bkrabach

@bkrabach Brian Krabach (bkrabach) commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve exact Fable5.2 baseline from draft141 (07131d2), including forced-tool/cold-budget guards. Its automation branch is untouched.
  • Correct Sonnet5 permanent prices and calculate Haiku5.5 whole-request tiers from fresh input+cache reads+writes exactly once. Price confirmed Fable5.2 fast mode, without enabling a request capability.
  • One Decimal accessor supplies runtime and fixed Core Pricing when available. Provider-local AnthropicModelInfo.pricing_details carries descriptive fixed/tiered rates; Haiku flat Pricing stays None. No Core edits, new Foundation dependency, Mythos prices or descriptive inference defaults.
  • Unknown TTL/modifiers remain null+reason; true zero is known and incomplete session totals remain unknown.

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.

Amplifier Resolve and others added 4 commits November 12, 2026 03:39
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>
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.

2 participants