Embeddings: support Google Gemini for knowledge-base processing
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- google-cloud, typescript
- Domain
- ai, backend, documentation
Research direction
Start by reading the shared embedding provider registry from #458, since this issue only adds the Gemini entry on top of it. Then check embeddingDimensionsSupported and KB_EMBEDDING_DIMENSIONS in lib/ai/platform-models.ts, with lib/ai/embed.ts and ownEmbeddingModel in lib/ai/models.ts. Verify that the 1536-dimension output works with Google's docs, and confirm that lib/kb/embedding-migration.ts re-embeds on switch. Done means Gemini can be selected and tested in Settings, uploads and search work, and unit tests pass.
Written by the indexing model from the issue text.
Description
Copied from DeadantCo/answerLoops#72 · originally opened by sethr07 on 2026-11-20
Copied from https://github.com/answerLoops/answerLoops/issues/379 — originally opened by
@NathanTarberton 2026-10-14
Right now OpenAI is the only named provider answerLoops can use for knowledge-base processing. That's the embeddings step, which turns articles and uploaded files into something the bot can search. A workspace can already pick Google Gemini for answers, but the knowledge-base side still needs an OpenAI key (or the included AI usage on a hosted plan).
Gemini has its own embeddings API, so it would be great to support it directly. Once it lands, a single Gemini key could cover both answers and knowledge-base search, the same way an OpenAI key does today.
Things worth knowing before you start
The knowledge base stores vectors in a fixed-size column of 1536 dimensions. That's KB_EMBEDDING_DIMENSIONS in lib/ai/platform-models.ts (re-exported from lib/ai/embed.ts), so every embedding model has to produce exactly that size. gemini-embedding-001 lets the caller choose its output size, and 1536 is one of the sizes it offers. That should make it a good fit. It's worth confirming against Google's docs, and checking whether vectors shorter than the full 3072 need normalizing before they're stored. In the same file, embeddingDimensionsSupported is where a model gets marked as able to fill the column.
Each workspace's stored vectors are tied to the model that produced them. When a workspace changes embedding model, a background job in lib/kb/embedding-migration.ts re-embeds its articles onto the new one. That job builds its model through ownEmbeddingModel in lib/ai/models.ts, so it will work with Gemini as long as that function does.
Where to start
Shared work is in #458; this issue adds only the Gemini entry, its dimension handling, tests and docs page.
- The registry entry for
gemini: model construction, default model and key fallback from a Gemini chat key, as defined by #458. - Dimension handling: see
embeddingDimensionsSupportedinlib/ai/platform-models.ts. content/docs/integrations/google-gemini.mdxandcontent/docs/product/ai-config.mdxshould be updated to say Gemini covers both once this ships.
Depends on
Depends on #458 (data-driven embedding provider registry). Shared work is in #458; this issue adds only the Gemini entry, its dimension handling, tests and docs page. Sibling: #380 (Mistral). Please coordinate there so the two don't collide.
What done looks like
A workspace can choose Gemini under Embeddings in Settings → AI Model, and Test connection checks it with a live call. Uploads and search work end to end. Switching to or from Gemini re-embeds existing articles. The new provider path has unit tests.
If you'd like to take this on, leave a comment and we'll assign it to you. Questions are welcome here too.
Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DeadantCo/answerLoopsdev
-
Widget: match the chat bubble color to the rest of the widgetPossibly taken @sethr07 claimed this today. Openenhancement frontend help wanted
Difficulty 2/5 Half a day Newbie friendliness 75/100
DeadantCo/answerLoopsdev#68 · 3 comments ·
-
Widget: make the chat window fit on small phonesPossibly taken @sethr07 claimed this today. Openenhancement frontend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DeadantCo/answerLoopsdev#67 · 9 comments ·
-
Add 'select all' option to Slack channel picker in SettingsPossibly taken @sethr07 claimed this today. Openfrontend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DeadantCo/answerLoopsdev#22 · 5 comments ·
-
enhancement frontend help wanted
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DeadantCo/answerLoopsdev#140 ·
All issues in DeadantCo/answerLoopsdev
Similar issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100
lingdojo/kana-dojo#34545 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
blocklist addition
Difficulty 1/5 Under an hour Newbie friendliness 82/100
MetaMask/eth-phishing-detect#315455 ·
Maintainers usually reply within 1 day
-
area: telegram bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
griffinwork40/agent-afk#5275 ·
Maintainers usually reply within 1 day
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reachedOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getopenscreen/openscreen#1667 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erkamyaman/rust-anything#371 ·
Maintainers usually reply within 1 day