zeroclaw-labs/zeroclaw · error
AzureOpenAiBuilder: deployment_name() is required
Error message
AzureOpenAiBuilder: deployment_name() is required
What it means
Documented panic in AzureOpenAiBuilder::build (see the builder's # Panics section): the deployment_name was never set. Azure OpenAI endpoints are constructed as resource_name + deployment path, and neither value has a sensible default, so the builder fails fast instead of emitting a malformed URL. The faulting input is the omitted builder call — call .deployment_name(...) (and .resource_name(...)) before build().
Solutions
- Set deployment_name on the AzureOpenAiBuilder before calling build().
- Configure the Azure deployment name in the provider configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/zeroclaw-providers/src/azure_openai.rs:264 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/4972092fce09d208.
Report an issue: GitHub.
Appendix: source
Thrown at crates/zeroclaw-providers/src/azure_openai.rs:264
}
/// Reasoning effort passed through for GPT-5 / o-series routing.
pub fn reasoning_effort(mut self, effort: Option<String>) -> Self {
self.reasoning_effort = effort;
self
}
/// # Panics
/// Panics if [`Self::resource_name`] or [`Self::deployment_name`]
/// was not called — Azure needs both to construct the deployment
/// URL and there is no sensible default for either.
pub fn build(self) -> AzureOpenAiModelProvider {
let resource_name = self
.resource_name
.expect("AzureOpenAiBuilder: resource_name() is required");
let deployment_name = self
.deployment_name
.expect("AzureOpenAiBuilder: deployment_name() is required");
let version = self
.api_version
.unwrap_or_else(|| DEFAULT_API_VERSION.to_string());
let base_url = format!(
"https://{}.openai.azure.com/openai/deployments/{}",
resource_name, deployment_name
);
AzureOpenAiModelProvider {
alias: self.alias,
credential: self.credential,
resource_name,
deployment_name,
api_version: version,
base_url,
reasoning_effort: self.reasoning_effort,
}
}
}View on GitHub (pinned to 88bb9c8533)