agenthub-python 0.4.12__tar.gz → 0.4.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/PKG-INFO +1 -1
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_chat/client.py +16 -3
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/pyproject.toml +1 -1
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/pyproject.toml.orig +1 -1
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/README.md +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/abort_signal.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/ant_messages/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/ant_messages/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/auto_client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/base_client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/claude5/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/claude5/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/deepseek_v4/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/deepseek_v4/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/errors.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/gemini3_8/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/gemini3_8/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/glm5_3/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/glm5_3/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/gpt6/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/gpt6/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/integration/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/integration/playground.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/integration/tracer.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/kimi_k3/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/kimi_k3/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/minimax_m3/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/minimax_m3/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_chat/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_chat_vllm_adapter/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_chat_vllm_adapter/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_embedding/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_embedding/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_responses/__init__.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_responses/client.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/registry.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/types.py +0 -0
- {agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/utils.py +0 -0
|
@@ -143,6 +143,14 @@ class OpenaiChatClient(LLMClient):
|
|
|
143
143
|
List of OpenAI Chat Completions message dictionaries
|
|
144
144
|
"""
|
|
145
145
|
openai_messages = []
|
|
146
|
+
# The reasoning field this upstream has produced so far, if any. A turn the model
|
|
147
|
+
# answered without thinking still has to carry that field, empty, when it made tool
|
|
148
|
+
# calls: DeepSeek stops thinking part-way through a long tool chain, and then rejects
|
|
149
|
+
# the replay of that turn with "the reasoning_content in the thinking mode must be
|
|
150
|
+
# passed back to the API". It waives that only for tool_call ids it issued itself,
|
|
151
|
+
# which a relay that reissues ids takes away. A conversation that never produced a
|
|
152
|
+
# reasoning field never receives one.
|
|
153
|
+
replay_fields: set[str | None] = set()
|
|
146
154
|
|
|
147
155
|
for msg in messages:
|
|
148
156
|
content_parts = [] # may be empty for tool results
|
|
@@ -158,6 +166,8 @@ class OpenaiChatClient(LLMClient):
|
|
|
158
166
|
elif item["type"] == "thinking":
|
|
159
167
|
thinking += item["thinking"]
|
|
160
168
|
thinking_fields.add((item.get("fidelity") or {}).get("reasoning_field"))
|
|
169
|
+
if item["thinking"]:
|
|
170
|
+
replay_fields.add((item.get("fidelity") or {}).get("reasoning_field"))
|
|
161
171
|
elif item["type"] == "tool_call":
|
|
162
172
|
tool_calls.append(
|
|
163
173
|
{
|
|
@@ -201,12 +211,15 @@ class OpenaiChatClient(LLMClient):
|
|
|
201
211
|
if tool_calls:
|
|
202
212
|
message["tool_calls"] = tool_calls
|
|
203
213
|
|
|
204
|
-
|
|
214
|
+
# This turn's own fidelity when it thought; otherwise the field the upstream has
|
|
215
|
+
# produced, with `thinking` still "" — the empty value keeps the turn replayable.
|
|
216
|
+
fields = thinking_fields if thinking else replay_fields
|
|
217
|
+
if thinking or (tool_calls and replay_fields):
|
|
205
218
|
# send thinking back through the exact field the upstream produced (recorded
|
|
206
219
|
# in the item fidelity); servers may reject the spelling they did not emit
|
|
207
|
-
if
|
|
220
|
+
if fields == {"reasoning_content"}:
|
|
208
221
|
message["reasoning_content"] = thinking
|
|
209
|
-
elif
|
|
222
|
+
elif fields == {"reasoning"}:
|
|
210
223
|
message["reasoning"] = thinking
|
|
211
224
|
else:
|
|
212
225
|
message["reasoning_content"] = thinking # vLLM & siliconflow compatibility
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_chat_vllm_adapter/__init__.py
RENAMED
|
File without changes
|
{agenthub_python-0.4.12 → agenthub_python-0.4.13}/agenthub/openai_chat_vllm_adapter/client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|