Expand description
Upgrade legacy native Messages/count-tokens requests before upstream dispatch. Work on the original JSON so provider extensions and signed blocks survive; only fields rejected by API 2026-10-21 are changed.
Functionsยง
- applies_
to - prepare
- Requires a buffered body. Unchanged requests retain their exact bytes. Fallback credits bind the original payload and must not be rewritten.