跳到主要内容
版本:Current

Model Selection

命名规则

Open WebUI 中显示的模型 ID 必须与 LiteLLM config.yaml 里每一项的 model_name 完全一致(区分大小写)。

示例片段:

  - model_name: gpt-5-mini
litellm_params:
model: openai/gpt-5-mini
api_key: os.environ/OPENAI_API_KEY

用户在界面选择 gpt-5-mini,LiteLLM 再映射到 openai/gpt-5-mini

选型建议

场景建议模型
快速问答、翻译gpt-5-minigemini-2.5-flashclaude-haiku-4.5
长文写作、分析gpt-5.1gemini-2.5-proclaude-sonnet-4.5
代码生成gpt-5.1-codex-max
深度推理deepseek-reasoner(注意耗时)
中文对话、性价比glm-4.7glm-4.5-flash

思考 / Reasoning 模型

  • deepseek-reasoner:在配置中启用了 thinking
  • 智谱 GLM:通过 extra_body.chat_template_kwargs.enable_thinking 控制(当前为 false

行为以各厂商 API 为准;若界面无「思考过程」展示,仍可能只在后端消耗更多 token。

模型不可用

  1. 确认 LiteLLM 容器运行:docker ps | grep litellm
  2. 确认对应厂商 Key 在 api_keys.env 中有效
  3. 在服务器上测试:curl /v1/models 与试发 /v1/chat/completions
  4. 查看 docker logs litellm --tail 100

新增模型流程见 LiteLLM Models