agenthub-python 0.4.7__tar.gz → 0.4.8__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.7 → agenthub_python-0.4.8}/PKG-INFO +1 -1
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/glm5_3/client.py +20 -3
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/integration/playground.py +2 -2
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/registry.py +11 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/pyproject.toml +1 -1
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/pyproject.toml.orig +1 -1
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/README.md +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/abort_signal.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/ant_messages/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/ant_messages/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/auto_client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/base_client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/claude5/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/claude5/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/deepseek_v4/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/deepseek_v4/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/errors.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/gemini3_7/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/gemini3_7/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/glm5_3/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/gpt5_6/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/gpt5_6/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/integration/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/integration/tracer.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/kimi_k3/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/kimi_k3/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/minimax_m3/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/minimax_m3/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/openai_chat/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/openai_chat/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/openai_embedding/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/openai_embedding/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/openai_responses/__init__.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/openai_responses/client.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/types.py +0 -0
- {agenthub_python-0.4.7 → agenthub_python-0.4.8}/agenthub/utils.py +0 -0
|
@@ -164,6 +164,12 @@ class GLM5_3Client(LLMClient):
|
|
|
164
164
|
Returns:
|
|
165
165
|
List of OpenAI message dictionaries
|
|
166
166
|
"""
|
|
167
|
+
# glm-5.3-flash is the natively multimodal GLM and the only one that reads image
|
|
168
|
+
# parts (https://docs.z.ai/guides/vlm/glm-5.3-flash); every other GLM answers a request
|
|
169
|
+
# carrying one with an error, so the item is refused here rather than dropped.
|
|
170
|
+
# Provider-hosted ids keep their own casing (e.g. z-ai/glm-5.3-flash), so the version
|
|
171
|
+
# match is case-insensitive.
|
|
172
|
+
supports_image = "glm-5.3-flash" in self._model.lower()
|
|
167
173
|
openai_messages = []
|
|
168
174
|
|
|
169
175
|
for msg in messages:
|
|
@@ -175,7 +181,10 @@ class GLM5_3Client(LLMClient):
|
|
|
175
181
|
if item["type"] == "text":
|
|
176
182
|
content_parts.append({"type": "text", "text": item["text"]})
|
|
177
183
|
elif item["type"] == "image_url":
|
|
178
|
-
|
|
184
|
+
if not supports_image:
|
|
185
|
+
raise ValueError(f"GLM {self._model} does not support image inputs.")
|
|
186
|
+
|
|
187
|
+
content_parts.append({"type": "image_url", "image_url": {"url": item["image_url"]}})
|
|
179
188
|
elif item["type"] == "thinking":
|
|
180
189
|
thinking += item["thinking"]
|
|
181
190
|
thinking_fields.add((item.get("fidelity") or {}).get("reasoning_field"))
|
|
@@ -194,15 +203,23 @@ class GLM5_3Client(LLMClient):
|
|
|
194
203
|
if "tool_call_id" not in item:
|
|
195
204
|
raise ValueError("tool_call_id is required for tool result.")
|
|
196
205
|
|
|
206
|
+
# a tool result without images stays a plain string, the only content shape
|
|
207
|
+
# the Chat Completion schema documents for a tool message
|
|
208
|
+
content = item["text"]
|
|
197
209
|
if "images" in item and item["images"]:
|
|
198
|
-
|
|
210
|
+
if not supports_image:
|
|
211
|
+
raise ValueError(f"GLM {self._model} does not support images in tool results.")
|
|
212
|
+
|
|
213
|
+
content = [{"type": "text", "text": item["text"]}]
|
|
214
|
+
for image_url in item["images"]:
|
|
215
|
+
content.append({"type": "image_url", "image_url": {"url": image_url}})
|
|
199
216
|
|
|
200
217
|
# Tool results are sent as separate messages
|
|
201
218
|
openai_messages.append(
|
|
202
219
|
{
|
|
203
220
|
"role": "tool",
|
|
204
221
|
"tool_call_id": item["tool_call_id"],
|
|
205
|
-
"content":
|
|
222
|
+
"content": content,
|
|
206
223
|
}
|
|
207
224
|
)
|
|
208
225
|
else:
|
|
@@ -225,8 +225,8 @@ def create_chat_app() -> Flask:
|
|
|
225
225
|
<button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="claude-sonnet-5" data-label="Claude Sonnet 5" data-description="claude-sonnet-5" onclick="selectComboboxOption('modelCombobox', this)">
|
|
226
226
|
<span class="block truncate text-sm font-medium text-gray-900">Claude Sonnet 5</span>
|
|
227
227
|
</button>
|
|
228
|
-
<button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="glm-5.3" data-label="GLM 5.3" data-description="glm-5.3" onclick="selectComboboxOption('modelCombobox', this)">
|
|
229
|
-
<span class="block truncate text-sm font-medium text-gray-900">GLM 5.3</span>
|
|
228
|
+
<button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="glm-5.3-flash" data-label="GLM 5.3 Flash" data-description="glm-5.3-flash" onclick="selectComboboxOption('modelCombobox', this)">
|
|
229
|
+
<span class="block truncate text-sm font-medium text-gray-900">GLM 5.3 Flash</span>
|
|
230
230
|
</button>
|
|
231
231
|
<button type="button" role="option" aria-selected="false" class="w-full px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none" data-combobox-option data-value="kimi-k3" data-label="Kimi K3" data-description="kimi-k3" onclick="selectComboboxOption('modelCombobox', this)">
|
|
232
232
|
<span class="block truncate text-sm font-medium text-gray-900">Kimi K3</span>
|
|
@@ -262,6 +262,17 @@ _SUPPORTED_MODELS: list[SupportedModel] = [
|
|
|
262
262
|
"context_window": 1000000,
|
|
263
263
|
"pricing": _usd(1.4, 4.4, cached=0.26),
|
|
264
264
|
},
|
|
265
|
+
{
|
|
266
|
+
"model": "glm-5.3-flash",
|
|
267
|
+
"base_url": _ZAI,
|
|
268
|
+
"client": "glm-5.3",
|
|
269
|
+
"input_modalities": ["Text", "Image"],
|
|
270
|
+
"output_modalities": ["Text"],
|
|
271
|
+
"context_window": 1000000,
|
|
272
|
+
# official list price (verified 2026-08-26); a launch discount halves all three rates
|
|
273
|
+
# through 2026-09-09 (UTC+8)
|
|
274
|
+
"pricing": _usd(0.15, 0.5, cached=0.03),
|
|
275
|
+
},
|
|
265
276
|
{
|
|
266
277
|
"model": "glm-5.2",
|
|
267
278
|
"base_url": _ZAI,
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|