``tools[]`` entry that exposes the client-side advisor to the model. Regular tool-use shape (NOT ``server_tool_use``) so any provider that supports tool calling can route the invocation. Description doubles as a one-line "what does this do" for the model — the full policy lives in `
()
| 318 | |
| 319 | |
| 320 | def build_client_advisor_tool_schema() -> dict[str, Any]: |
| 321 | """``tools[]`` entry that exposes the client-side advisor to the model. |
| 322 | |
| 323 | Regular tool-use shape (NOT ``server_tool_use``) so any provider that |
| 324 | supports tool calling can route the invocation. Description doubles |
| 325 | as a one-line "what does this do" for the model — the full policy |
| 326 | lives in ``ADVISOR_TOOL_INSTRUCTIONS`` (system prompt). |
| 327 | """ |
| 328 | return { |
| 329 | "name": ADVISOR_TOOL_NAME, |
| 330 | "description": ( |
| 331 | "Consult a stronger reviewer model. Takes no parameters; the " |
| 332 | "current conversation is forwarded automatically. Returns the " |
| 333 | "reviewer's advice as text." |
| 334 | ), |
| 335 | "input_schema": dict(CLIENT_ADVISOR_TOOL_INPUT_SCHEMA), |
| 336 | } |
| 337 | |
| 338 | |
| 339 | def decide_advisor_mode( |
no outgoing calls