{"record":{"id":"d5ec04a6dda2f391","repo":"microsoft/autogen","slug":"template-templateid-not-found-for-component-typ","errorCode":null,"errorMessage":"Template ${templateId} not found for component type ${componentType}","messagePattern":"Template (.+?) not found for component type (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-studio/frontend/src/components/types/component-templates.ts","lineNumber":530,"sourceCode":"  const templates = COMPONENT_TEMPLATES[componentType];\n  return templates.find((template) => template.id === templateId);\n}\n\nexport function getDefaultTemplate(\n  componentType: ComponentTypes\n): ComponentTemplate<ComponentConfig> | undefined {\n  const templates = COMPONENT_TEMPLATES[componentType];\n  return templates[0]; // Return first template as default\n}\n\nexport function createComponentFromTemplate(\n  templateId: string,\n  componentType: ComponentTypes,\n  overrides?: Partial<Component<ComponentConfig>>\n): Component<ComponentConfig> {\n  const template = getTemplateById(componentType, templateId);\n  if (!template) {\n    throw new Error(\n      `Template ${templateId} not found for component type ${componentType}`\n    );\n  }\n\n  return {\n    provider: template.provider,\n    component_type: template.component_type,\n    version: template.version,\n    component_version: template.component_version,\n    description: template.description,\n    config: template.config,\n    label: template.label,\n    ...overrides,\n  };\n}\n\n// Workbench-specific helper functions\nexport interface WorkbenchDropdownOption {","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-studio/frontend/src/components/types/component-templates.ts#L512-L548","documentation":"Raised on the azure_openai embedding path when `openai_endpoint` is missing from the config. Azure OpenAI clients are constructed per-resource (endpoint-scoped), unlike plain OpenAI, so a resource URL is mandatory; api_key can be omitted in favor of DefaultAzureCredential but the endpoint cannot.","triggerScenarios":"Configuring embedding_provider='azure_openai' and embedding_model but not setting `openai_endpoint` (e.g. only openai_api_key set, or copying a plain-OpenAI config and switching provider), then running a vector search.","commonSituations":"Confusing the Azure AI Search endpoint (which IS set) with the Azure OpenAI endpoint (a separate resource); forgetting the endpoint when using key-based auth because examples show key-only for plain OpenAI; environment-specific config where the endpoint env var is unset in one environment.","solutions":["Set `openai_endpoint` to your Azure OpenAI resource URL, e.g. \"https://<resource-name>.openai.azure.com\".","Confirm you are not accidentally reusing the AI Search endpoint value; they are different resources.","If you meant to use non-Azure OpenAI, set embedding_provider=\"openai\" instead (no endpoint needed)."],"exampleFix":"# before\nconfig = AzureAISearchConfig(\n    ..., embedding_provider=\"azure_openai\", embedding_model=\"text-embedding-3-large\",\n)  # missing endpoint\n\n# after\nconfig = AzureAISearchConfig(\n    ...,\n    embedding_provider=\"azure_openai\",\n    embedding_model=\"text-embedding-3-large\",\n    openai_endpoint=\"https://my-aoai.openai.azure.com\",\n    openai_api_version=\"2024-02-01\",\n)","handlingStrategy":"validation","validationCode":"def validate_azure_openai(cfg) -> None:\n    if str(cfg.embedding_provider or \"\").lower() == \"azure_openai\" and not getattr(cfg, \"openai_endpoint\", None):\n        raise ValueError(\"openai_endpoint is required for azure_openai embeddings\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep AI Search endpoint and OpenAI endpoint as separate, clearly named env vars.","Use pydantic validation on your own settings model to require the endpoint when provider is azure_openai."],"tags":["python","azure-openai","configuration","embeddings"],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}