magic
magic copied to clipboard
[Bug]: 配置好的模型没有调用,一直调用的是openai
Component
Super Magic (Super Magic)
Deployment Type
Self-hosted (Docker)
Bug Description
配置好的模型没有调用,一直调用的是openai 无法添加新用户
Steps to Reproduce
无
Expected Behavior
无
Actual Behavior
工作流中选择大模型时 没有已配置好的模型可以选择
Environment
无
Logs and Error Messages
No response
Additional Context
No response
Checklist
- [x] I have searched for existing issues before creating this report
- [x] I have provided all the required information above
- [x] This issue is reproducible
+1
@Rock-520 麻烦assign下这个bug
超级麦吉模型修改,看一下config 下面的yaml 文件 配置
以下是AI给出的答案,成功改用了deepseek:
我来解释这两个文件之间的变量关系和如何配置使用 DeepSeek 模型:
文件关系说明
- config.yaml.example 是主配置文件,定义了系统的基础配置和模型配置
- .env_super_magic.example 是环境变量文件,用于覆盖主配置文件中的默认值
配置关系
- 在
config.yaml中定义了 agent 模式和模型别名:
agent_modes:
apex:
model_aliases:
main_llm: gpt-4.1
coder_llm: gpt-4.1
writer_llm: gpt-4.1
browser_llm: gpt-4.1
worker_llm: gpt-4.1
- 这些别名可以通过环境变量进行覆盖:
model_aliases:
main_llm: ${MAIN_LLM:-gpt-4.1}
coder_llm: ${CODER_LLM:-gpt-4.1}
writer_llm: ${WRITER_LLM:-gpt-4.1}
browser_llm: ${BROWSER_LLM:-gpt-4.1}
worker_llm: ${WORKER_LLM:-gpt-4.1}
配置使用 DeepSeek 模型
要统一使用 DeepSeek 模型,需要在 .env_super_magic 文件中添加以下配置:
# DeepSeek Configuration
DEEPSEEK_API_KEY="your_deepseek_api_key"
DEEPSEEK_API_BASE_URL="https://api.deepseek.com/v1"
DEEPSEEK_MODEL="deepseek-chat"
# Set all agents to use DeepSeek
MAIN_LLM=deepseek-chat
CODER_LLM=deepseek-chat
WRITER_LLM=deepseek-chat
BROWSER_LLM=deepseek-chat
WORKER_LLM=deepseek-chat
# Optional: Set safety checker to use DeepSeek
AGENT_SAFETY_MODEL_ID=deepseek-chat
注意事项
- DeepSeek 模型的配置已在
config.yaml中定义:
deepseek-chat:
api_key: "${DEEPSEEK_API_KEY}"
api_base_url: "${DEEPSEEK_API_BASE_URL:-https://api.deepseek.com/v1}"
name: "${DEEPSEEK_MODEL:-deepseek-chat}"
type: "llm"
supports_tool_use: true
provider: "openai"
max_output_tokens: 16000
max_context_tokens: 32000
temperature: 0.7
pricing:
input_price: 0.002
output_price: 0.008
cache_write_price: 0.0005
currency: "CNY"
- 确保已获取有效的 DeepSeek API 密钥
- 如果需要不同场景使用不同的 DeepSeek 模型,可以分别配置:
- 使用
deepseek-chat用于一般对话 - 使用
deepseek-reasoner用于需要更强推理能力的场景
- 使用