mirror of
https://github.com/xtekky/gpt4free.git
synced 2026-03-07 06:12:16 -08:00
* feat: add tool_call emulation for OpenAI API Avoid forcing PollinationsAI when tools are present, and add an opt-in tool_emulation mode (or G4F_TOOL_EMULATION=1) to emit OpenAI-compatible tool_calls for providers that ignore tools. * fix: avoid duplicate stream kwarg in tool emulation Tool emulation calls the upstream provider with stream=False; remove stream/stream_timeout from forwarded kwargs to prevent conflicts. * fix: prefer non-auth providers when api_key missing When routing via AnyProvider without an api_key, try providers with needs_auth=false first to reduce MissingAuthError for tool-enabled clients like MarksCode. * test: cover tool call emulation Route tool_emulation through ToolSupportProvider (avoid circular imports) and add unittest coverage for multi-tool JSON plans and run_tools integration. |
||
|---|---|---|
| .. | ||
| examples | ||
| testing | ||
| tool | ||
| unittest | ||