Skip to content

Conversation

@skamenan7
Copy link
Contributor

Summary

  • Introduces request models for VectorIO Protocol methods, aligning with the DatasetIO pattern
  • Moves request models to llama_stack_api/vector_io/models.py
  • Updates all provider implementations (faiss, sqlite_vec, pgvector, qdrant, milvus, chroma, elasticsearch, weaviate) to accept request objects
  • Updates OpenAIVectorStoreMixin to use request models throughout
  • Updates unit tests to reflect the new signatures

Test plan

  • Pre-commit hooks pass (uv run pre-commit run --all-files -v)
  • Unit tests pass (1051 passed, 7 skipped)
  • Docker integration tests pass (./scripts/integration-tests.sh --stack-config server:ci-tests --suite base --setup ollama)

Closes #4717

cc @leseb

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 27, 2026
@skamenan7 skamenan7 marked this pull request as draft January 27, 2026 13:53
@skamenan7 skamenan7 force-pushed the fix/4717-Protocol-VectorIO branch 2 times, most recently from dd2d6a4 to 6c23e0d Compare January 27, 2026 14:01
Copy link
Collaborator

@franciscojavierarceo franciscojavierarceo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! this looks like the right direction, we should hold though until @alinaryan finishes this PR:

#4743

@skamenan7 skamenan7 force-pushed the fix/4717-Protocol-VectorIO branch from 6c23e0d to c3226e0 Compare January 27, 2026 14:20
@skamenan7 skamenan7 marked this pull request as ready for review January 28, 2026 18:09
@skamenan7 skamenan7 force-pushed the fix/4717-Protocol-VectorIO branch 2 times, most recently from 88c958c to c896df3 Compare January 28, 2026 20:59
This change aligns the VectorIO Protocol methods with the DatasetIO pattern by introducing dedicated Request models for complex operations.

- Moves request models to `llama_stack_api/vector_io/models.py`.
- Updates `api.py` protocol signatures to use these models.
- Updates `fastapi_routes.py` to use models for request bodies.
- Updates `VectorIORouter` and routing tables to handle request objects.
- Updates `OpenAIVectorStoreMixin` and all vector store providers to accept request objects.
- Implements missing file batch methods in `OpenAIVectorStoreMixin`.
- Updates unit tests to reflect the new signatures.

This improves type safety and allows for easier future extension of method arguments.
Update the tool_executor.py to use the new request model pattern
for openai_search_vector_store() calls. This aligns with the
VectorIO Protocol refactoring in issue llamastack#4717.

The method was previously called with flat parameters but the
Protocol now expects an OpenAISearchVectorStoreRequest object.
…tion limits

- Fix batch file_counts.failed not being incremented during file batch
  processing. Failed files are now properly counted alongside completed.
- Add pagination limit constraints (ge=1, le=100) to list endpoints for
  OpenAI API compatibility: openai_list_vector_stores,
  openai_list_files_in_vector_store, openai_list_files_in_vector_store_file_batch.
@skamenan7 skamenan7 force-pushed the fix/4717-Protocol-VectorIO branch from c896df3 to 916422a Compare January 29, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vector_io: align Protocol signatures with request models

2 participants