Azure / Azure/azure-sdk-for-python

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

Aperta
#45,962 2 commenti 0 reazioni 1 assegnatario Rivendicata da @dargilco Vedi su GitHub
AI Projects customer-reported needs-team-attention question Service Attention
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
202

Descrizione

# 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)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.