v0.4.2
What's Changed
Changed
ReasoningConfig.enabledreplaced withmodefield: The booleanenabledfield has been replaced bymode: Literal["auto", "enabled", "disabled"]. This aligns the IR more closely with provider semantics (Anthropic's three-waythinking.type, OpenAI Responses'reasoning.type). Omittingmoderetains the previous "provider default" behavior.
Fixed
- Responses API
developerrole mapping:role: "developer"(OpenAI Responses equivalent of"system") now correctly maps to IR"system"during Provider→IR conversion - Google GenAI
additionalPropertiesrejection: Addedextra_strip_keysparameter tosanitize_schema()— Google tool_ops now recursively stripsadditionalPropertiesfrom function declaration schemas - Google GenAI
prompt_tokens_detailsformat mismatch: Google returnslist[ModalityTokenCount]but IR expectsdict[str, int]. Added bidirectional conversion helpers supporting both SDK and REST API field names - Cross-format tool call ID prefix mapping: Automatic prefix mapping (
call_/toolu_↔fc_) during Responses API conversion prevents validation failures - Adaptive thinking fallback:
mode: "enabled"withoutbudget_tokenscorrectly falls back to{"type": "adaptive"}for Anthropic, instead of producing an invalid request
Full Changelog: v0.4.1...v0.4.2