Skip to main content

Module claude_compat

Module claude_compat 

Source
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.