Embeddings: make the provider list data-driven so adding a provider is one entry
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- nextjs, typescript
Línea de trabajo
Start with EMBEDDING_PROVIDERS in lib/actions/ai-config.ts, then read ownEmbeddingModel and buildEmbeddingModel in lib/ai/models.ts, plus lib/ai/config-validation.ts and lib/ai/embedding-pin.ts. The settings list in app/(dashboard)/settings/page.tsx must be derived from the same registry. Done when the registry holds only openai and openai-compatible, existing behavior and validation messages are unchanged, and pnpm test and pnpm build pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Copied from DeadantCo/answerLoops#102 · originally opened by sethr07 on 2026-11-20
Copied from https://github.com/answerLoops/answerLoops/issues/458 — originally opened by
@NathanTarberton 2026-10-23
What
Embedding providers are defined in several places that each assume OpenAI. Adding Gemini (#379) or Mistral (#380) today means touching all of them, and two contributors working in parallel would conflict on the same lines. This issue turns the provider list into one registry so that adding a provider is a single entry.
Why
The shared edits are the same for every provider. Doing them once, up front, lets #379 and #380 shrink to "add one entry, handle that model's vector size, write tests and docs", and keeps them from colliding.
Where the provider is hard-coded today
EMBEDDING_PROVIDERSinlib/actions/ai-config.tsis the list the server accepts (openai,openai-compatible). The settings form keeps a separate list of the same name inapp/(dashboard)/settings/page.tsx, so the two can drift.ownEmbeddingModelandbuildEmbeddingModelinlib/ai/models.tsalways build an OpenAI client.ownEmbeddingModelserves saved workspace config and the background re-embedding job;buildEmbeddingModelserves "Test connection" with values the user just typed.hasOwnEmbeddingConfiginlib/ai/embedding-pin.ts(and the matching key lookup insideownEmbeddingModel) lets only an OpenAI chat key stand in for an embedding key.validateAIConfiginlib/ai/config-validation.tshas OpenAI-specific rules: a key is required after switching to OpenAI, OpenAI embeddings need their own key when the chat provider is not OpenAI, and a custom endpoint needs a base URL.- The embedding check in
lib/ai/test-connection.tsbuilds its model throughbuildEmbeddingModel. embeddingDimensionsSupportedandKB_EMBEDDING_DIMENSIONSinlib/ai/platform-models.tsdecide whether a model can fill the fixed 1536-dimension vector column.
Scope
One registry that defines each embedding provider: id, label, how to build the model from a key and optional base URL, default model, fixed output dimension (or how to request one), and the validation rules that apply to it. The server schema, the settings form, lib/ai/models.ts, lib/ai/embedding-pin.ts, validateAIConfig and test-connection all read from the registry instead of branching on provider names. The registry ships with the existing entries only: openai and openai-compatible.
Acceptance
- Existing OpenAI and openai-compatible behavior is unchanged: same validation messages, same key fallback from an OpenAI chat key, same re-embedding behavior.
- The server and the settings form can no longer disagree about which providers exist.
- Unit tests cover the registry and each consumer.
- Docs under
content/docs/are updated to describe how embedding providers are defined. pnpm testandpnpm buildpass.
Related: #379 (Gemini), #380 (Mistral).
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DeadantCo/answerLoopsdev
-
Widget: match the chat bubble color to the rest of the widgetPosiblemente ocupada @sethr07 la tomó hoy. Abiertoenhancement frontend help wanted
Dificultad 2/5 Medio día Aptitud para principiantes 75/100
DeadantCo/answerLoopsdev#68 · 3 comentarios ·
-
Widget: make the chat window fit on small phonesPosiblemente ocupada @sethr07 la tomó hoy. Abiertoenhancement frontend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
DeadantCo/answerLoopsdev#67 · 9 comentarios ·
-
Add 'select all' option to Slack channel picker in SettingsPosiblemente ocupada @sethr07 la tomó hoy. Abiertofrontend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DeadantCo/answerLoopsdev#22 · 5 comentarios ·
-
enhancement frontend help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
DeadantCo/answerLoopsdev#140 ·
Todos los issues de DeadantCo/answerLoopsdev
Issues similares
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
lingdojo/kana-dojo#34545 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
Blocklist addition requestAbiertoblocklist addition
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
MetaMask/eth-phishing-detect#315455 ·
Los mantenedores suelen responder en 1 día
-
area: telegram bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
griffinwork40/agent-afk#5275 ·
Los mantenedores suelen responder en 1 día
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reachedAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getopenscreen/openscreen#1667 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
erkamyaman/rust-anything#371 ·
Los mantenedores suelen responder en 1 día