fix: improve Vector Stores OpenAI API conformance#5398
fix: improve Vector Stores OpenAI API conformance#5398leseb wants to merge 10 commits intollamastack:mainfrom
Conversation
Fix schema issues in the Vector Stores API to improve OpenAI conformance from 61.3% to 87.1%. Key changes: - Add VectorStoreExpirationAfter model with anchor/days fields - Add VectorStoreStatus and VectorStoreFileBatchFileEntry types - Make required fields non-optional (name, usage_bytes, status, etc.) - Fix object literal types to match OpenAI spec - Add missing error codes (unsupported_file, invalid_file) - Make metadata nullable to match OpenAI spec Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ llama-stack-client-go studio · conflict
✅ llama-stack-client-python studio · code · diff
✅ llama-stack-client-openapi studio · code · diff
✅ llama-stack-client-node studio · conflict
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
|
Nice |
Fix vector_store.files_batch typo to vector_store.file_batch (matching OpenAI spec). Add missing usage_bytes field to test constructors after making it required. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
… fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
The usage_bytes field was made required but many code paths construct VectorStoreFileObject and VectorStoreObject without setting it, causing 500 errors during file search operations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Making usage_bytes optional is intentional - the runtime doesn't always have this value available (e.g. during file search operations). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
The name field was changed from optional to required, but stored vector stores may have name=null. Default to empty string to prevent validation errors when loading existing data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sébastien Han <seb@redhat.com>
Summary
Fix schema issues in the Vector Stores API to improve OpenAI conformance from 61.3% to ~87%.
Supersedes #5394 (which was too broad, mixing embeddings + vector stores + OpenAPI generator changes).
Key changes
VectorStoreExpirationAftermodel withanchor/daysfieldsVectorStoreStatusliteral type andVectorStoreFileBatchFileEntrymodelname,usage_bytes,status,has_more)objectfields to useLiteraltypes with correct valuesunsupported_file,invalid_file)metadatanullable to match OpenAI specdescriptionfield to vector store create requestFiles changed (6 source + regenerated specs)
src/llama_stack_api/vector_io/models.py- schema fixessrc/llama_stack/core/routers/vector_io.py- pass newly required fieldssrc/llama_stack/providers/utils/memory/openai_vector_store_mixin.py- pass newly required fieldsTest plan
🤖 Generated with Claude Code