Skip to content

Conversation

skamenan7
Copy link
Contributor

@skamenan7 skamenan7 commented Sep 25, 2025

What does this PR do?

Updates pyproject.toml dependencies to fix vector processing compatibility issues.

closes: #3495

Test Plan

Tested llama stack server with faiss vector database:

  1. Built and ran server: llama stack build --distro starter --image-type venv --image-name llamastack-faiss
  2. Tested file upload: Successfully uploaded PDF via /v1/openai/v1/files
  3. Tested vector operations:
    - Created vector store with faiss backend
    - Added PDF to vector store
    - Performed semantic search queries

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 25, 2025
@skamenan7 skamenan7 marked this pull request as ready for review September 26, 2025 12:31
leseb
leseb previously approved these changes Sep 26, 2025
Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

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

I'm confused, the starter image has:

  - provider_id: rag-runtime
    provider_type: inline::rag-runtime

which pulls both pypdf and chardet.
However, I do agree that this is a miss. Especially if someone is not using inline::rag-runtime.

Btw using started I don't repro your issue.

Copy link
Collaborator

@mattf mattf left a comment

Choose a reason for hiding this comment

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

can these be put in llama_stack/providers/registry/vector_io.py ?

@leseb
Copy link
Collaborator

leseb commented Sep 26, 2025

can these be put in llama_stack/providers/registry/vector_io.py ?

for all providers?

EDIT: at least the ones that speak openai vector store

@mattf
Copy link
Collaborator

mattf commented Sep 26, 2025

can these be put in llama_stack/providers/registry/vector_io.py ?

for all providers?

EDIT: at least the ones that speak openai vector store

yes, make them deps for providers that use them

Copy link
Contributor

@ashwinb ashwinb left a comment

Choose a reason for hiding this comment

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

for Matt's comment

@leseb leseb dismissed their stale review September 29, 2025 06:56

in prov config registry

@skamenan7
Copy link
Contributor Author

skamenan7 commented Sep 29, 2025

Thanks all for your comments. Yes, I encountered this when I tried to use openai compatible endpoint for file upload flow without rag runtime.

@skamenan7
Copy link
Contributor Author

Hi @mattf , @ashwinb , @leseb, I will go ahead and add chardet and pypdf to their pip_packages for all the following vector IO providers that have
optional_api_dependencies=[Api.files]

  1. inline::meta-reference (line 26) - pip_packages=["faiss-cpu"]
  2. inline::faiss (line 36) - pip_packages=["faiss-cpu"]
  3. inline::sqlite-vec (line 89) - pip_packages=["sqlite-vec"]
  4. inline::sqlite_vec (line 297) - pip_packages=["sqlite-vec"] (deprecated)
  5. remote::chromadb (line 310) - pip_packages=["chromadb-client"]
  6. inline::chromadb (line 352) - pip_packages=["chromadb"]
  7. remote::pgvector (line 396) - pip_packages=["psycopg2-binary"]
  8. remote::weaviate (line 508) - pip_packages=["weaviate-client"]
  9. inline::qdrant (line 548) - pip_packages=["qdrant-client"]
  10. remote::qdrant (line 601) - pip_packages=["qdrant-client"]
  11. remote::milvus (line 614) - pip_packages=["pymilvus>=2.4.10"]
  12. inline::milvus (line 820) -
  pip_packages=["pymilvus[milvus-lite]>=2.4.10"]

@skamenan7 skamenan7 force-pushed the fix/vector-io-openai-chardet-error branch from 9a2bf5d to ddfd2ef Compare October 2, 2025 17:55
Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

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

please remove the changes in uv.lock and we can move fw with this

@skamenan7 skamenan7 force-pushed the fix/vector-io-openai-chardet-error branch from e166e47 to 9f036e7 Compare October 6, 2025 14:41
Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

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

please remove uv.lock changes

@skamenan7 skamenan7 force-pushed the fix/vector-io-openai-chardet-error branch from 9f036e7 to be35185 Compare October 6, 2025 15:10
…egistries

Moves chardet and pypdf from main dependencies to provider-specific pip_packages
for all 12 vector IO providers that support file processing (Api.files).

Updated providers:
- inline::meta-reference, inline::faiss, inline::sqlite-vec, inline::sqlite_vec
- remote::chromadb, inline::chromadb, remote::pgvector, remote::weaviate
- inline::qdrant, remote::qdrant, remote::milvus, inline::milvus
@skamenan7 skamenan7 force-pushed the fix/vector-io-openai-chardet-error branch 2 times, most recently from 05c36e1 to d4466e3 Compare October 7, 2025 12:51
Consolidate the common vector IO dependencies (chardet, pypdf) into a
single DEFAULT_VECTOR_IO_DEPS variable to reduce duplication across
all vector IO provider registries and the RAG tool runtime.
@skamenan7 skamenan7 force-pushed the fix/vector-io-openai-chardet-error branch from d4466e3 to 6c422ca Compare October 7, 2025 12:55
@skamenan7
Copy link
Contributor Author

Hi @leseb , I took care of uv.lock comment you pointed out. Thanks.

@skamenan7 skamenan7 requested a review from leseb October 7, 2025 12:57
Copy link
Collaborator

@leseb leseb left a comment

Choose a reason for hiding this comment

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

victory!

@leseb leseb dismissed ashwinb’s stale review October 7, 2025 13:00

addressed, deps in registry now

@leseb leseb merged commit 1fcde5f into llamastack:main Oct 7, 2025
21 checks passed
@skamenan7 skamenan7 deleted the fix/vector-io-openai-chardet-error branch October 7, 2025 17:15
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.

OpenAI file processing fails with "No module named 'chardet'" dependency error

5 participants