Skip to content

[FEATURE]: RAG & Embedding Search Capability and request to add qwen3-embedding-8b in the go plan #27586

@EHMilon

Description

@EHMilon

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions