microsoft/autogen · error · Error

Template ${templateId} not found for component type ${compon

Error message

Template ${templateId} not found for component type ${componentType}

What it means

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.

Source

Thrown at python/packages/autogen-studio/frontend/src/components/types/component-templates.ts:530

  const templates = COMPONENT_TEMPLATES[componentType];
  return templates.find((template) => template.id === templateId);
}

export function getDefaultTemplate(
  componentType: ComponentTypes
): ComponentTemplate<ComponentConfig> | undefined {
  const templates = COMPONENT_TEMPLATES[componentType];
  return templates[0]; // Return first template as default
}

export function createComponentFromTemplate(
  templateId: string,
  componentType: ComponentTypes,
  overrides?: Partial<Component<ComponentConfig>>
): Component<ComponentConfig> {
  const template = getTemplateById(componentType, templateId);
  if (!template) {
    throw new Error(
      `Template ${templateId} not found for component type ${componentType}`
    );
  }

  return {
    provider: template.provider,
    component_type: template.component_type,
    version: template.version,
    component_version: template.component_version,
    description: template.description,
    config: template.config,
    label: template.label,
    ...overrides,
  };
}

// Workbench-specific helper functions
export interface WorkbenchDropdownOption {

View on GitHub (pinned to 027ecf0a37)

Solutions

  1. Set `openai_endpoint` to your Azure OpenAI resource URL, e.g. "https://<resource-name>.openai.azure.com".
  2. Confirm you are not accidentally reusing the AI Search endpoint value; they are different resources.
  3. If you meant to use non-Azure OpenAI, set embedding_provider="openai" instead (no endpoint needed).

Example fix

# before
config = AzureAISearchConfig(
    ..., embedding_provider="azure_openai", embedding_model="text-embedding-3-large",
)  # missing endpoint

# after
config = AzureAISearchConfig(
    ...,
    embedding_provider="azure_openai",
    embedding_model="text-embedding-3-large",
    openai_endpoint="https://my-aoai.openai.azure.com",
    openai_api_version="2024-02-01",
)
Defensive patterns

Strategy: validation

Validate before calling

def validate_azure_openai(cfg) -> None:
    if str(cfg.embedding_provider or "").lower() == "azure_openai" and not getattr(cfg, "openai_endpoint", None):
        raise ValueError("openai_endpoint is required for azure_openai embeddings")

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15). Data as JSON: /api/errors/d5ec04a6dda2f391. Report an issue: GitHub.