Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/agent_runtime_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2872,7 +2872,7 @@ def sanitize_api_messages(messages: List[Dict[str, Any]]) -> List[Dict[str, Any]
if cid:
seen_assistant_call_ids.add(cid)
kept_tcs.append(tc)
if len(kept_tcs) != len(msg.get("tool_calls") or []):
if kept_tcs:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When every call is a duplicate, kept_tcs is empty and this leaves msg unchanged, including the original duplicate IDs. Please retain the changed-list check and remove the tool_calls key when no calls survive, so the sanitizer does not trade tool_calls: [] for duplicate-ID validation failures.

msg = {**msg, "tool_calls": kept_tcs}
deduped.append(msg)
elif role == "tool":
Expand Down
2 changes: 1 addition & 1 deletion agent/transports/chat_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _reasoning_config_for_model(model: str, reasoning_config: dict | None) -> di
if not isinstance(reasoning_config, dict):
return reasoning_config
if (
"gpt-5.6" in (model or "").lower()
("gpt-5.6" in (model or "").lower() or "glm-" in (model or "").lower())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please scope this to verified GLM-5.2 aliases rather than every glm- model. The existing Z.AI profile only maps native reasoning effort for GLM-5.2 (plugins/model-providers/zai/__init__.py:49-82), and the direct summary path also needs the same normalization.

and str(reasoning_config.get("effort") or "").strip().lower() == "ultra"
):
normalized = dict(reasoning_config)
Expand Down
Loading