Azure / Azure/azure-sdk-for-python

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

Open
#45,962 2 comments 0 reactions 1 assignee Claimed by @dargilco View on GitHub
AI Projects customer-reported needs-team-attention question Service Attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.