Read Anthropic, Gemini, Groq and Mistral keys from the environment for self-hosted deployments

未关闭
#114 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start by finding where the server reads OPENAI_API_KEY and how a workspace's saved key takes precedence, since the payload names no files. Extend the same fallback to ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, GROQ_API_KEY and MISTRAL_API_KEY, and add environment selection of the default provider and model. Done when a workspace with no saved key uses the server key, saved keys still win, and the self-hosting docs no longer say this is coming soon.

由索引模型根据 Issue 内容生成。

描述

enhancement

Copied from DeadantCo/answerLoops#104 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/469 — originally opened by @NathanTarbert on 2026-10-25

What

A self-hosted deployment reads one AI provider key from the environment: OPENAI_API_KEY. Anthropic, Google Gemini, Groq, Mistral and xAI work, but only when each workspace saves its own key in Settings → AI Model after signing in. ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, GROQ_API_KEY and MISTRAL_API_KEY are not read anywhere.

Why

Self-hosters who run on a different provider cannot configure it ahead of time. They need to deploy, sign in and click through Settings first, which blocks scripted or repeatable setups (infrastructure as code, preview environments, headless installs).

Scope

  • Read a server-wide key for each supported chat provider from the environment, used by workspaces that have not saved their own, the same way OPENAI_API_KEY is used today.
  • Allow choosing the default chat provider and model from the environment.
  • Keep per-workspace keys taking priority over the server default.
  • Update the self-hosting docs and the environment variable reference. They currently say this is coming soon.

Out of scope

Embeddings from Google Gemini and Mistral, which are tracked separately in #379 and #380.

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.

主要语言
TypeScript
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DeadantCo/answerLoopsdev 的其他 Issue

查看 DeadantCo/answerLoopsdev 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。