This document describes the enforced format for all tool calls exchanged between the orchestrator, Service Bus queues, and tool executors.
Every tool invocation must be emitted as an exact JSON object with only the fields listed below and double-quoted keys/values:
{ "type": "web", "q": "<non-empty string>", "k": <integer 1-10> }
{ "type": "code", "code_command": "<non-empty string>" }
{ "type": "azure", "azure_command": "<non-empty string>" }No additional properties (for example request_id or comments) are permitted. Payloads that fail to match the schema are rejected before they reach any queue.
serving/parser.pyonly accepts tool tags that contain a strict JSON object. Anything else is marked invalid.serving/validation.pyrejects unexpected keys and enforces value constraints prior to queue dispatch.serving/servicebus_web.pyvalidates outbound command messages and refuses to enqueue malformed payloads.
- Command senders in
serving/ToolGRPOTrainer/*_command_sender.pypublish the exact JSON body shown above and attach an AMQPmessage_idfor telemetry only. Responses are correlated by queue order; no metadata is embedded inside the payload. web-rl-env/src/command_queue.pylogsrequest accepted by webfor"type": "web"messages andrequest rejected by webotherwise. The background worker executes only accepted web searches.- Reward queue handling is unchanged and continues to forward executor output verbatim.
Both serving/run_model.py and serving/ToolGRPOTrainer/run_custom_grpo.py instruct the model to:
- Use only the
<think>,<web>,<code>,<azure>, and<solution>tags. - Wrap tool calls in the exact JSON objects above with no extra fields.
- Emit one tool call per turn and wait for
<tool_result>before proceeding.
These rules ensure every component—from prompt to queue to executor—enforces the same strict interface.