microsoft/autogen · error · Error
${componentType} template ${templateId} not found
Error message
${componentType} template ${templateId} not found What it means
Catch-all raised when the Azure OpenAI embeddings.create call raises any exception — the original is chained via `from e`. Typical underlying causes are 401/403 auth errors, a deployment name that doesn't match `embedding_model`, wrong api_version for the endpoint, throttling (429), or network failures.
Source
Thrown at python/packages/autogen-studio/frontend/src/components/types/component-templates.ts:606
componentType: ComponentTypes
): ComponentDropdownOption[] {
const templates = getTemplatesForType(componentType);
return templates.map((template) => ({
key: template.id,
label: template.label,
description: template.description,
templateId: template.id,
}));
}
export function createComponentFromTemplateById(
componentType: ComponentTypes,
templateId: string,
customLabel?: string
): Component<ComponentConfig> {
const template = getTemplateById(componentType, templateId);
if (!template) {
throw new Error(`${componentType} template ${templateId} not found`);
}
return createComponentFromTemplate(templateId, componentType, {
label: customLabel || `New ${template.label}`,
});
}
// Specific helper functions for each component type
export function getTeamTemplatesForDropdown(): ComponentDropdownOption[] {
return getTemplatesForDropdown("team");
}
export function createTeamFromTemplate(
templateId: string,
customLabel?: string
): Component<ComponentConfig> {
return createComponentFromTemplateById("team", templateId, customLabel);
}View on GitHub (pinned to 027ecf0a37)
Solutions
- Inspect the chained cause (`except ValueError as e: print(e.__cause__)`) — the real Azure error is inside.
- Set `embedding_model` to the exact deployment name on your Azure OpenAI resource.
- Set `openai_api_version` to a version your resource supports (e.g. "2024-02-01" or newer).
- For 429s add backoff/retry or a higher quota; for 401/403 fix keys/role assignment (Cognitive Services OpenAI User role).
Example fix
# before
config = AzureAISearchConfig(
..., embedding_provider="azure_openai",
embedding_model="text-embedding-3-large", # deployment mismatch
)
# after — model = your DEPLOYMENT name
config = AzureAISearchConfig(
..., embedding_provider="azure_openai",
embedding_model="my-text-embedding-3-deployment",
openai_api_version="2024-02-01",
) Defensive patterns
Strategy: retry
Try / catch
import asyncio
async def embed_search(tool, query: str, attempts: int = 3):
for i in range(attempts):
try:
return await tool.run(query)
except ValueError as e:
cause = e.__cause__
status = getattr(cause, "status_code", None)
if status == 429 and i < attempts - 1:
await asyncio.sleep(2 ** i)
continue
raise Prevention
- Match embedding_model to the exact Azure deployment name.
- Pin openai_api_version to one your resource supports.
- Always inspect e.__cause__ before guessing at fixes.
When it happens
Trigger: Calling a vector search with embedding_provider='azure_openai' where `azure_client.embeddings.create(model=embedding_model, input=query)` throws: model not deployed on the resource, api_version mismatch (default '2023-11-01' vs resource expecting newer), invalid/insufficient credential, or transient 429/timeout.
Common situations: Using the base model name (text-embedding-ada-002) instead of the custom deployment name; defaulting to api_version 2023-11-01 against newer resources that require a supported version; hitting rate limits during load tests; key expired or rotated.
Related errors
- Unauthorized
- Template ${templateId} not found for component type ${compon
- Workbench template ${templateId} not found
- Failed to fetch gallery
- Authentication failed
AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15).
Data as JSON: /api/errors/7e876dcbf4084073.
Report an issue: GitHub.