refactor: share execution prep for tool-call phase
Keep the current tool-call bridge contract stable while extracting shared execution setup and tightening Anthropic forwarding regressions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -52,10 +52,9 @@ class AnthropicMessagesRequest(BaseModel):
|
||||
stop_sequences: list[str] | None = None
|
||||
# metadata.user_id is the official hint for per-user routing / abuse tracking.
|
||||
metadata: dict[str, Any] | None = None
|
||||
# Tools / tool_choice are accepted but we can't forward them to Lingma yet —
|
||||
# they're preserved here so the request doesn't 422, and the flattener
|
||||
# surfaces any tool_use blocks as `[tool_use] {...}` text so the assistant
|
||||
# still sees the context.
|
||||
# Tools / tool_choice are accepted for compatibility and, when forwarding is
|
||||
# enabled, are passed upstream as tool_config; tool_use / tool_result blocks
|
||||
# are still flattened into text so the assistant can see prior tool context.
|
||||
tools: list[dict[str, Any]] | None = None
|
||||
tool_choice: dict[str, Any] | None = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user