* Tool probes verify real function-calling support by invoking a tool and inspecting the response. * Distinct from sweeps (which vary AixAPI_Model parameters): a probe sets request-level `tools` + `toolsPolicy` * and a user prompt, then classifies pass/fail from the parser's function-call events.
| 185 | * entries (e.g. `"fn": ["auto"]`). Absence of the key means the probe did not pass for that model. |
| 186 | */ |
| 187 | interface ToolProbeDefinition { |
| 188 | /** Probe name, shown in logs. Also used as the output JSON key (e.g. 'fn'). */ |
| 189 | name: string; |
| 190 | /** Human-readable description for --help */ |
| 191 | description: string; |
| 192 | applicability: |
| 193 | | { type: 'all' } |
| 194 | | { type: 'dialects'; dialects: AixAPI_Access['dialect'][] }; |
| 195 | userPrompt: string; |
| 196 | tools: AixTools_ToolDefinition[]; |
| 197 | toolsPolicy: AixTools_ToolsPolicy; |
| 198 | /** Function name that must be called for the probe to pass. */ |
| 199 | expectedFunctionName: string; |
| 200 | /** Value listed under the output key when the probe passes (e.g. 'auto'). */ |
| 201 | passValue: string; |
| 202 | /** Optional additional validation on the parsed args object (must return true). */ |
| 203 | validateArgs?: (args: any) => boolean; |
| 204 | /** |
| 205 | * If set, after the model emits a valid tool call we inject a canned tool_response and re-dispatch. |
| 206 | * Pass then additionally requires: turn 2 emits text (no loop, no empty), and that text contains |
| 207 | * at least one of `signalTokens` (case-insensitive substring) - proving the model actually consumed |
| 208 | * the tool result rather than ignoring it. |
| 209 | */ |
| 210 | roundtrip?: { |
| 211 | /** Serialized tool result (typically a JSON-stringified object). Must be a JSON object string per validation upstream. */ |
| 212 | cannedResult: string; |
| 213 | /** At least one of these substrings must appear (case-insensitive) in turn 2's text. */ |
| 214 | signalTokens: string[]; |
| 215 | }; |
| 216 | } |
| 217 | |
| 218 | const _getWeatherTool: AixTools_ToolDefinition = { |
| 219 | type: 'function_call', |
nothing calls this directly
no outgoing calls
no test coverage detected