Files
copilotkit__copilotkit/showcase/aimock/d6/langgraph-python/tool-rendering-custom-catchall.json
Jordan Ritter 69c964aca2 feat(showcase-aimock): D6 fixtures for LangGraph-based integrations
Adds per-integration D6 fixtures for langgraph-python, langgraph-typescript,
and langgraph-fastapi. Each fixture is keyed by match.context for cross-
integration isolation and uses hasToolResult:false on toolCall responses
to prevent re-match loops.
2026-05-26 14:02:17 -07:00

88 lines
3.4 KiB
JSON

{
"_meta": {
"description": "D6 fixtures for langgraph-python / tool-rendering-custom-catchall",
"sourceFile": "d5-tool-rendering-custom-catchall.ts",
"created": "2026-05-22"
},
"fixtures": [
{
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo follow-up. After get_weather tool result returns, emit narrated content. MUST come before the tool-emitting fixture so iteration 2 hits this branch.",
"match": {
"userMessage": "check Tokyo weather forecast",
"toolCallId": "call_d6_cc_weather_001",
"context": "langgraph-python"
},
"response": {
"content": "Tokyo is 22\u00b0C and partly cloudy \u2014 rendered through the custom wildcard catchall."
}
},
{
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
"match": {
"userMessage": "check Tokyo weather forecast",
"toolName": "get_weather",
"context": "langgraph-python"
},
"response": {
"toolCalls": [
{
"id": "call_d6_cc_weather_001",
"name": "get_weather",
"arguments": "{\"location\":\"Tokyo\"}"
}
]
}
},
{
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo fallback when no get_weather tool registered.",
"match": {
"userMessage": "check Tokyo weather forecast",
"turnIndex": 0,
"context": "langgraph-python"
},
"response": {
"content": "The weather in Tokyo is currently 22\u00b0C with partly cloudy skies."
}
},
{
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
"match": {
"userMessage": "What's the current price of AAPL?",
"toolCallId": "call_d6_cc_stock_001",
"context": "langgraph-python"
},
"response": {
"content": "AAPL is trading at $338.37, down 2.96% \u2014 rendered through the custom wildcard catchall."
}
},
{
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
"match": {
"userMessage": "What's the current price of AAPL?",
"toolName": "get_stock_price",
"context": "langgraph-python"
},
"response": {
"toolCalls": [
{
"id": "call_d6_cc_stock_001",
"name": "get_stock_price",
"arguments": "{\"ticker\":\"AAPL\",\"price_usd\":338.37,\"change_pct\":-2.96}"
}
]
}
},
{
"_comment": "tool-rendering-custom-catchall \u2014 AAPL fallback when no get_stock_price tool registered.",
"match": {
"userMessage": "What's the current price of AAPL?",
"turnIndex": 0,
"context": "langgraph-python"
},
"response": {
"content": "AAPL is trading at $338.37, down 2.96% on the day."
}
}
]
}