Feature hasn't been suggested before.
Describe the enhancement you want to request
Currently, interacting with large-scale repositories can lead to context-window saturation or "hallucinations" when the model lacks specific project knowledge. I am proposing the integration of a RAG pipeline and Vector Embedding Search into OpenCode.
This will allow the AI to index local files, documentation, and issues, providing highly relevant context to queries without requiring the user to manually attach every file.
Local Vector Store: Implement a lightweight vector database (like ChromaDB or LanceDB) to store file embeddings.
Indexing Workflow: A background process to chunk and embed repository files.
Context Injection: Automatically retrieving the top-$k$ relevant code snippets and injecting them into the prompt context during chat or autocomplete sessions.
Model Request: Qwen3-Embedding-8B To power this, I suggest adding support for qwen/qwen3-embedding-8b in the OpenCode Go plan. because It offers state-of-the-art retrieval performance and handles long-context code chunks more efficiently than smaller 1B-3B models.
Real-World Impact "Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." — Samuel Johnson By adding RAG, OpenCode moves from the first kind of knowledge to the second. For developers, this means: Instant Onboarding: Ask "How is authentication handled in this repo?" and get the exact files and logic flow.
Reduced Token Costs: Only the most relevant snippets are sent to the LLM, rather than the entire codebase.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Currently, interacting with large-scale repositories can lead to context-window saturation or "hallucinations" when the model lacks specific project knowledge. I am proposing the integration of a RAG pipeline and Vector Embedding Search into OpenCode.
This will allow the AI to index local files, documentation, and issues, providing highly relevant context to queries without requiring the user to manually attach every file.
Local Vector Store: Implement a lightweight vector database (like ChromaDB or LanceDB) to store file embeddings.
Indexing Workflow: A background process to chunk and embed repository files.
Context Injection: Automatically retrieving the top-$k$ relevant code snippets and injecting them into the prompt context during chat or autocomplete sessions.
Model Request: Qwen3-Embedding-8B To power this, I suggest adding support for qwen/qwen3-embedding-8b in the OpenCode Go plan. because It offers state-of-the-art retrieval performance and handles long-context code chunks more efficiently than smaller 1B-3B models.
Real-World Impact "Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." — Samuel Johnson By adding RAG, OpenCode moves from the first kind of knowledge to the second. For developers, this means: Instant Onboarding: Ask "How is authentication handled in this repo?" and get the exact files and logic flow.
Reduced Token Costs: Only the most relevant snippets are sent to the LLM, rather than the entire codebase.