microsoft/autogen · error · Error

Failed to create gallery

Error message

Failed to create gallery

What it means

Raised when config.embedding_provider is set to a value other than 'azure_openai' or 'openai' (case-insensitive). The client-side embedding dispatch is a closed set; unknown providers fail fast instead of silently sending unvectorized queries.

Source

Thrown at python/packages/autogen-studio/frontend/src/components/views/gallery/api.ts:49

  async createGallery(
    galleryData: Partial<Gallery>,
    userId: string
  ): Promise<Gallery> {
    const gallery = {
      ...galleryData,
      user_id: userId,
    };

    console.log("Creating gallery with data:", gallery);

    const response = await fetch(`${this.getBaseUrl()}/gallery/`, {
      method: "POST",
      headers: this.getHeaders(),
      body: JSON.stringify(gallery),
    });
    const data = await response.json();
    if (!data.status)
      throw new Error(data.message || "Failed to create gallery");
    return data.data;
  }

  async updateGallery(
    galleryId: number,
    galleryData: Partial<Gallery>,
    userId: string
  ): Promise<Gallery> {
    const gallery = {
      ...galleryData,
      user_id: userId,
    };

    const response = await fetch(
      `${this.getBaseUrl()}/gallery/${galleryId}?user_id=${userId}`,
      {
        method: "PUT",
        headers: this.getHeaders(),

View on GitHub (pinned to 027ecf0a37)

Solutions

  1. Use exactly "azure_openai" or "openai" (lowercase, underscore) as the provider string.
  2. For server-side vectorization (index-configured vectorizers), leave embedding_provider/embedding_model unset and keep vector_fields — the tool will use VectorizableTextQuery.
  3. If you need another provider, subclass the tool and override _get_embedding.

Example fix

# before
config = AzureAISearchConfig(
    ..., vector_fields=["contentVector"], embedding_provider="azure-openai",  # hyphen: unsupported
)

# after
config = AzureAISearchConfig(
    ..., vector_fields=["contentVector"], embedding_provider="azure_openai",
)
Defensive patterns

Strategy: validation

Validate before calling

SUPPORTED_PROVIDERS = {"azure_openai", "openai"}

def provider_supported(cfg) -> bool:
    p = getattr(cfg, "embedding_provider", None)
    return p is None or p.lower() in SUPPORTED_PROVIDERS

Prevention

When it happens

Trigger: Passing embedding_provider values like "azure", "azure_ai_search", "server", "cohere", or correctly configured provider strings with typos ("azure-openai" with a hyphen) while vector_fields are set.

Common situations: Assuming the service-side vectorizer name goes in embedding_provider; hyphen vs underscore confusion ('azure-openai' instead of 'azure_openai'); trying to plug in a third-party embedding provider that this tool does not support.

Related errors


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