{"record":{"id":"1d90ccf30877a9fc","repo":"microsoft/autogen","slug":"failed-to-create-gallery","errorCode":null,"errorMessage":"Failed to create gallery","messagePattern":"Failed to create gallery","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-studio/frontend/src/components/views/gallery/api.ts","lineNumber":49,"sourceCode":"  async createGallery(\n    galleryData: Partial<Gallery>,\n    userId: string\n  ): Promise<Gallery> {\n    const gallery = {\n      ...galleryData,\n      user_id: userId,\n    };\n\n    console.log(\"Creating gallery with data:\", gallery);\n\n    const response = await fetch(`${this.getBaseUrl()}/gallery/`, {\n      method: \"POST\",\n      headers: this.getHeaders(),\n      body: JSON.stringify(gallery),\n    });\n    const data = await response.json();\n    if (!data.status)\n      throw new Error(data.message || \"Failed to create gallery\");\n    return data.data;\n  }\n\n  async updateGallery(\n    galleryId: number,\n    galleryData: Partial<Gallery>,\n    userId: string\n  ): Promise<Gallery> {\n    const gallery = {\n      ...galleryData,\n      user_id: userId,\n    };\n\n    const response = await fetch(\n      `${this.getBaseUrl()}/gallery/${galleryId}?user_id=${userId}`,\n      {\n        method: \"PUT\",\n        headers: this.getHeaders(),","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-studio/frontend/src/components/views/gallery/api.ts#L31-L67","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use exactly \"azure_openai\" or \"openai\" (lowercase, underscore) as the provider string.","For server-side vectorization (index-configured vectorizers), leave embedding_provider/embedding_model unset and keep vector_fields — the tool will use VectorizableTextQuery.","If you need another provider, subclass the tool and override _get_embedding."],"exampleFix":"# before\nconfig = AzureAISearchConfig(\n    ..., vector_fields=[\"contentVector\"], embedding_provider=\"azure-openai\",  # hyphen: unsupported\n)\n\n# after\nconfig = AzureAISearchConfig(\n    ..., vector_fields=[\"contentVector\"], embedding_provider=\"azure_openai\",\n)","handlingStrategy":"validation","validationCode":"SUPPORTED_PROVIDERS = {\"azure_openai\", \"openai\"}\n\ndef provider_supported(cfg) -> bool:\n    p = getattr(cfg, \"embedding_provider\", None)\n    return p is None or p.lower() in SUPPORTED_PROVIDERS","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use Literal['azure_openai', 'openai'] typing on your own config wrapper to catch typos statically.","Remember: for server-side vectorization leave the provider unset rather than inventing a value."],"tags":["python","configuration","embeddings","enum"],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}