Azure / Azure/azure-sdk-for-python

[azure-ai-projects] POST /v1/vector_stores/{id}/search returns 404 on Foundry project endpoint

Abierto
#45,962 2 comentarios 0 reacciones 1 asignado Reclamado por @dargilco Ver en GitHub
AI Projects customer-reported needs-team-attention question Service Attention
Lenguaje dominante
Python
Estrellas
5.6k
Forks
3.4k
Merge medio
2 d 2 h
PR fusionados (30 d)
213

Descripción

# Describe the Bug

The vector store search endpoint (POST /v1/vector_stores/{vector_store_id}/search) is documented in the OpenAI.v1 preview spec and returns HTTP 404 on all tested Azure AI Foundry project surfaces. This means there is no way to perform a direct vector store search without going through the Responses API (POST /v1/responses) with a file_search tool — which requires a full model inference call.

# Repro Steps

The following reproduces the issue directly against the REST API:

TOKEN=$(az account get-access-token --resource https://ai.azure.com --query accessToken -o tsv)

**Foundry project endpoint**
curl -X POST \
"https://{resource}.services.ai.azure.com/api/projects/{project}/openai/v1/vector_stores/{vs_id}/search" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"query": "test query", "max_num_results": 10}'

**cognitiveservices endpoint**
curl -X POST \
"https://{resource}.cognitiveservices.azure.com/openai/v1/vector_stores/{vs_id}/search" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"query": "test query", "max_num_results": 10}'

**Both return:**

{"error": {"code": "404", "message": "Resource not found"}}

The vector store IDs used are valid — confirmed via GET /openai/v1/vector_stores on the same endpoint with the same token. Other vector store operations (list, get, create, delete) work correctly on the same surface.

# Expected Behaviour

A 200 response with matching chunks per the OpenAI.VectorStoreSearchResultsPage schema defined in specification/ai/data-plane/OpenAI.v1/azure-v1-preview-generated.yaml.

# Spec reference:

- Spec file: [specification/ai/data-plane/OpenAI.v1/azure-v1-preview-generated.yaml](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/ai/data-plane/OpenAI.v1/azure-v1-preview-generated.yaml)
- Operation: searchVectorStore — search for /vector_stores/{vector_store_id}/search in the file

# Impact

Without this endpoint, the only path to query a Foundry-managed vector store is POST /v1/responses with a file_search tool, which adds model inference latency and token costs for what should be a pure retrieval operation. This
also prevents building summarisation features that require fetching all chunks for a given file.

# System Information

- Package: azure-ai-projects
- Tested via: Direct REST (curl)
- Auth scope: https://ai.azure.com
- Tested date: 2026-03-27
- Foundry setup: Basic agent setup, Foundry project (not hub-based)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.