Spaces:
Running
Running
Commit ·
8f93e8a
1
Parent(s): 8a1485e
Fix: Bypass think_parser to emit raw thinking tags as plain text when reasoning isn't explicitly requested by client
Browse files- src/free_claude_code/api/__pycache__/dependencies.cpython-314.pyc +0 -0
- src/free_claude_code/api/__pycache__/response_streams.cpython-314.pyc +0 -0
- src/free_claude_code/api/__pycache__/routes.cpython-314.pyc +0 -0
- src/free_claude_code/providers/__pycache__/key_rotator.cpython-314.pyc +0 -0
- src/free_claude_code/providers/nvidia_nim/__pycache__/client.cpython-314.pyc +0 -0
- src/free_claude_code/providers/openai_chat/__pycache__/provider.cpython-314.pyc +0 -0
- src/free_claude_code/providers/openai_chat/provider.py +10 -1
src/free_claude_code/api/__pycache__/dependencies.cpython-314.pyc
CHANGED
|
Binary files a/src/free_claude_code/api/__pycache__/dependencies.cpython-314.pyc and b/src/free_claude_code/api/__pycache__/dependencies.cpython-314.pyc differ
|
|
|
src/free_claude_code/api/__pycache__/response_streams.cpython-314.pyc
CHANGED
|
Binary files a/src/free_claude_code/api/__pycache__/response_streams.cpython-314.pyc and b/src/free_claude_code/api/__pycache__/response_streams.cpython-314.pyc differ
|
|
|
src/free_claude_code/api/__pycache__/routes.cpython-314.pyc
CHANGED
|
Binary files a/src/free_claude_code/api/__pycache__/routes.cpython-314.pyc and b/src/free_claude_code/api/__pycache__/routes.cpython-314.pyc differ
|
|
|
src/free_claude_code/providers/__pycache__/key_rotator.cpython-314.pyc
CHANGED
|
Binary files a/src/free_claude_code/providers/__pycache__/key_rotator.cpython-314.pyc and b/src/free_claude_code/providers/__pycache__/key_rotator.cpython-314.pyc differ
|
|
|
src/free_claude_code/providers/nvidia_nim/__pycache__/client.cpython-314.pyc
CHANGED
|
Binary files a/src/free_claude_code/providers/nvidia_nim/__pycache__/client.cpython-314.pyc and b/src/free_claude_code/providers/nvidia_nim/__pycache__/client.cpython-314.pyc differ
|
|
|
src/free_claude_code/providers/openai_chat/__pycache__/provider.cpython-314.pyc
CHANGED
|
Binary files a/src/free_claude_code/providers/openai_chat/__pycache__/provider.cpython-314.pyc and b/src/free_claude_code/providers/openai_chat/__pycache__/provider.cpython-314.pyc differ
|
|
|
src/free_claude_code/providers/openai_chat/provider.py
CHANGED
|
@@ -388,7 +388,16 @@ class _OpenAIChatStreamRunner:
|
|
| 388 |
yield out_event
|
| 389 |
|
| 390 |
if delta.content:
|
| 391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 392 |
if part.type == ContentType.THINKING:
|
| 393 |
if not output_reasoning:
|
| 394 |
continue
|
|
|
|
| 388 |
yield out_event
|
| 389 |
|
| 390 |
if delta.content:
|
| 391 |
+
if output_reasoning and not self._reasoning.requests_reasoning:
|
| 392 |
+
class _MockPart:
|
| 393 |
+
type = ContentType.TEXT
|
| 394 |
+
content = delta.content
|
| 395 |
+
|
| 396 |
+
parts = [_MockPart()]
|
| 397 |
+
else:
|
| 398 |
+
parts = think_parser.feed(delta.content)
|
| 399 |
+
|
| 400 |
+
for part in parts:
|
| 401 |
if part.type == ContentType.THINKING:
|
| 402 |
if not output_reasoning:
|
| 403 |
continue
|