{"record":{"id":"d6e7e766e4d1c854","repo":"BoundaryML/baml","slug":"not-implemented","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"engine/baml-runtime/src/internal/llm_client/orchestrator/mod.rs","lineNumber":220,"sourceCode":"impl WithSingleCallable for OrchestratorNode {\n    async fn single_call(&self, ctx: &impl HttpContext, prompt: &RenderedPrompt) -> LLMResponse {\n        // Create IDs for the function call and content\n        {\n            let request = LoggedLLMRequest {\n                request_id: ctx.http_request_id().clone(),\n                client_name: self.provider.name().to_string(),\n                client_provider: self.provider.provider_name().to_string(),\n                params: self.provider.request_options().clone(),\n                prompt: match prompt {\n                    RenderedPrompt::Chat(chat) => chat\n                        .iter()\n                        .map(|m| LLMChatMessage {\n                            role: m.role.clone(),\n                            content: m.parts.iter().map(|p| p.into()).collect(),\n                        })\n                        .collect(),\n                    RenderedPrompt::Completion(completion) => {\n                        todo!(\"not implemented\")\n                    }\n                },\n            };\n\n            let event = TraceEvent::new_llm_request(\n                ctx.runtime_context().call_id_stack.clone(),\n                Arc::new(request),\n            );\n            BAML_TRACER.lock().unwrap().put(Arc::new(event));\n        }\n\n        // Possibly increment RoundRobin scope\n        self.scope\n            .scope\n            .iter()\n            .filter_map(|scope| match scope {\n                ExecutionScope::RoundRobin(a, _) => Some(a),\n                _ => None,","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/internal/llm_client/orchestrator/mod.rs#L202-L238","documentation":"During a single (non-streaming) LLM call, OrchestratorNode::single_call builds a LoggedLLMRequest trace event and converts the RenderedPrompt to the log format. The RenderedPrompt::Completion arm is a todo!(\"not implemented\"), so any completion-style prompt hits an unconditional Rust panic with the message \"not implemented\". This is a library-internal unimplemented path, not a user-input validation error.","triggerScenarios":"Invoking a BAML function configured with a completion-style client (provider llm.client / LLM_CLIENT or any prompt rendered as Completion rather than Chat) through the non-streaming single_call path, where the trace-event construction hits the Completion arm.","commonSituations":"Using legacy completion-style clients (e.g. text-completion OpenAI endpoints, AWS Bedrock completion clients) with a BAML runtime version where completion-prompt tracing is unimplemented; migrating old BAML projects that used llm.client providers onto newer runtime.","solutions":["Switch the client/prompt to chat style: use provider openai (chat) or another chat-capable provider and define the prompt with chat blocks instead of a raw completion string.","Avoid legacy completion providers (llm.client, text-completion endpoints) with this runtime version.","Upgrade baml CLI/runtime - check the changelog for completion-prompt support.","If a completion provider is mandatory, wrap the call so you catch the panic at the process boundary or file an upstream issue."],"exampleFix":"// before (baml) - completion-style prompt triggers the panic\nfunction Complete(prompt: string) -> string {\n  provider \"llm-client\"\n  prompt #\"{{ prompt }}\"#\n}\n// after - chat-style prompt\nfunction Complete(prompt: string) -> string {\n  provider \"openai\"\n  prompt #\"\n    {{ ctx.output_format }}\n    User: {{ prompt }}\n  \"#\n}","handlingStrategy":"validation","validationCode":"# ensure the function uses a chat-style provider and chat prompt\n# in clients.baml: provider must be a chat provider (openai, anthropic, azure, ...)\n# not llm.client / raw completion endpoints","typeGuard":null,"tryCatchPattern":"// python - guard the process boundary against the Rust panic\nfrom baml_py import PyPanicError\ntry:\n    result = b.Complete(prompt)\nexcept PyPanicError as e:\n    log.error(\"BAML internal panic (completion prompts unsupported): %s\", e)\n    result = fallback_chat_call(prompt)","preventionTips":["Never use legacy completion-style providers (llm.client) with this runtime.","Write all prompts as chat blocks so RenderedPrompt::Chat is produced.","Run `baml-cli test` locally to surface the panic before production.","Pin runtime versions and check the changelog for completion support."],"tags":["panic","not-implemented","llm","prompt"],"backgroundTag":"method-not-implemented","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}