{"record":{"id":"d8142ab6808b06dc","repo":"exo-explore/exo","slug":"error-message","errorCode":null,"errorMessage":"{error_message}","messagePattern":"\\{error_message\\}","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/exo/api/adapters/chat_completions.py","lineNumber":356,"sourceCode":"                if chunk.finish_reason is not None:\n                    finish_reason = chunk.finish_reason\n\n            case ToolCallChunk():\n                if model is None:\n                    model = chunk.model\n                last_usage = chunk.usage or last_usage\n                tool_calls.extend(\n                    ToolCall(\n                        id=tool.id,\n                        index=i,\n                        function=tool,\n                    )\n                    for i, tool in enumerate(chunk.tool_calls)\n                )\n                finish_reason = chunk.finish_reason\n\n    if error_message is not None:\n        raise ValueError(error_message)\n\n    combined_text = \"\".join(text_parts)\n    combined_thinking = \"\".join(thinking_parts) if thinking_parts else None\n    assert model is not None\n\n    yield ChatCompletionResponse(\n        id=command_id,\n        created=int(time.time()),\n        model=model,\n        choices=[\n            ChatCompletionChoice(\n                index=0,\n                message=ChatCompletionMessage(\n                    role=\"assistant\",\n                    content=combined_text,\n                    reasoning_content=combined_thinking,\n                    tool_calls=tool_calls if tool_calls else None,\n                ),","sourceCodeStart":338,"sourceCodeEnd":374,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/api/adapters/chat_completions.py#L338-L374","documentation":"Error \"{error_message}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/api/adapters/chat_completions.py:356 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}