gpt4free/g4f
Moises Tohias 76d8dc20e5
Fix Qwen provider implementation (#3322)
* Fix Qwen provider implementation

- Re-enable cookie generation for authentication
- Update User-Agent header to latest version
- Fix Authorization header to only be added when token is present
- Add X-Requested-With and X-Source headers for proper API communication
- Force stream and incremental_output to True for consistent streaming behavior
- Set parent_id to None to prevent parent-child relationship issues
- Add conditional thinking functionality with proper feature_config when enable_thinking is True
- Improve header management for better compatibility with Qwen API

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* Restore parent_id in Qwen provider for conversation support

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-12 20:53:45 +01:00
..
api Refactor update_headers function to accept new API key and adjust authorization handling 2026-01-12 15:22:59 +01:00
cli Refactor CLI argument parsers for API and MCP modes 2025-11-30 02:53:59 +05:30
client Update cache handling in PollinationsAI and OpenaiTemplate: modify cache logic and include cache header in Usage model 2026-01-09 18:37:01 +01:00
gui Fix session token handling in render function to correctly append query string to latest version 2026-01-12 12:20:05 +01:00
image Improve Yupp provider account handling , request timeout and get byte from url (#3249) 2025-11-26 14:02:51 +01:00
integration Refactor PollinationsAI model selection logic; update default system in AIModel; clean up unused provider imports 2025-11-10 13:58:07 +01:00
local Fix import in LocalClient 2025-01-07 00:36:22 +01:00
locals
mcp Update HuggingChat authentication flow and improve error handling; add image and audio templates in tools 2025-12-08 11:37:00 +01:00
Provider Fix Qwen provider implementation (#3322) 2026-01-12 20:53:45 +01:00
providers Refactor providers to use OpenaiTemplate and add backup URLs; enhance response handling in API 2026-01-10 06:35:41 +01:00
requests Fix header handling by adding Brotli check and adjusting accept-encoding 2026-01-04 15:25:19 +01:00
tools Refactor PollinationsAI: simplify prompt encoding and improve whitespace handling; update Gemini imports and response handling; enhance usage tracking in run_tools 2026-01-09 14:18:56 +01:00
__init__.py Refactor API base URL references across providers 2025-12-25 22:09:20 +01:00
__main__.py Update build 2025-08-22 13:45:19 +02:00
config.py Increase DEFAULT_STREAM_TIMEOUT from 15 to 30 for improved streaming performance 2025-12-28 07:55:34 +01:00
cookies.py Add CopilotSession provider and enhance PollinationsAI endpoints 2026-01-04 14:28:28 +01:00
debug.py refactor: restructure core utilities, typing, and request handling 2025-08-09 03:29:44 +02:00
errors.py Add Yupp provider implementation with account management and model fetching 2025-10-06 07:16:01 +02:00
files.py refactor: restructure core utilities, typing, and request handling 2025-08-09 03:29:44 +02:00
models.py Update model mappings and remove deprecated entries in PollinationsAI and LMArena 2026-01-04 15:31:15 +01:00
typing.py Fix undefined names, type errors, and code quality issues (#3288) 2025-12-12 08:33:43 +01:00
version.py Update build 2025-08-22 13:45:19 +02:00