{"record":{"id":"7e876dcbf4084073","repo":"microsoft/autogen","slug":"componenttype-template-templateid-not-found","errorCode":null,"errorMessage":"${componentType} template ${templateId} not found","messagePattern":"(.+?) template (.+?) not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-studio/frontend/src/components/types/component-templates.ts","lineNumber":606,"sourceCode":"  componentType: ComponentTypes\n): ComponentDropdownOption[] {\n  const templates = getTemplatesForType(componentType);\n  return templates.map((template) => ({\n    key: template.id,\n    label: template.label,\n    description: template.description,\n    templateId: template.id,\n  }));\n}\n\nexport function createComponentFromTemplateById(\n  componentType: ComponentTypes,\n  templateId: string,\n  customLabel?: string\n): Component<ComponentConfig> {\n  const template = getTemplateById(componentType, templateId);\n  if (!template) {\n    throw new Error(`${componentType} template ${templateId} not found`);\n  }\n\n  return createComponentFromTemplate(templateId, componentType, {\n    label: customLabel || `New ${template.label}`,\n  });\n}\n\n// Specific helper functions for each component type\nexport function getTeamTemplatesForDropdown(): ComponentDropdownOption[] {\n  return getTemplatesForDropdown(\"team\");\n}\n\nexport function createTeamFromTemplate(\n  templateId: string,\n  customLabel?: string\n): Component<ComponentConfig> {\n  return createComponentFromTemplateById(\"team\", templateId, customLabel);\n}","sourceCodeStart":588,"sourceCodeEnd":624,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-studio/frontend/src/components/types/component-templates.ts#L588-L624","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":"# before\nconfig = AzureAISearchConfig(\n    ..., embedding_provider=\"azure_openai\",\n    embedding_model=\"text-embedding-3-large\",  # deployment mismatch\n)\n\n# after — model = your DEPLOYMENT name\nconfig = AzureAISearchConfig(\n    ..., embedding_provider=\"azure_openai\",\n    embedding_model=\"my-text-embedding-3-deployment\",\n    openai_api_version=\"2024-02-01\",\n)","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"import asyncio\n\nasync def embed_search(tool, query: str, attempts: int = 3):\n    for i in range(attempts):\n        try:\n            return await tool.run(query)\n        except ValueError as e:\n            cause = e.__cause__\n            status = getattr(cause, \"status_code\", None)\n            if status == 429 and i < attempts - 1:\n                await asyncio.sleep(2 ** i)\n                continue\n            raise","preventionTips":["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."],"tags":["python","azure-openai","embeddings","wrapper-exception"],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}