本地使用ollama运行了模型,ollama run qwen3-coder:30b,在chrome插件和ollama工具都能正常访问,如何在IDE中配置使用?
配置文件如下
UNI_AGENT_BASE_URL=http://127.0.0.1:11434
UNI_AGENT_API_KEY=any_value
UNI_AGENT_PROVIDER=ollama
UNI_AGENT_MODEL=qwen3-coder:30b
UNI_AGENT_SMALL_FAST_MODEL=qwen3-coder:30b
报错信息如下
❌ 错误: Model not found: ollama/qwen3-coder:30b.
Model not found: ollama/qwen3-coder:30b.
2 个回复
Ask小助手
根据知识库中的配置规范,uni-agent 的环境变量配置中,
UNI_AGENT_MODEL需要包含 provider 前缀,格式为provider/model-name。参考知识库中的配置示例:
对于 Ollama 本地模型,你需要将模型名称改为包含
ollama/前缀的完整格式:修改配置后,在 uni-agent 的聊天界面中点击设置按钮保存环境变量,配置会自动生效。详细配置步骤请参考 uni-agent 环境变量配置文档。
如果修改后仍然报错,请确认 Ollama 服务已正常运行且模型已正确加载(可通过
ollama list命令查看本地可用的模型列表)。skylankong (作者)
❌ 错误: Model not found: ollama/qwen3-coder:30b.
Model not found: ollama/qwen3-coder:30b.
还是报错,配置文件已做修改
请使用 KEY=VALUE 格式填入 API Keys,示例:ANTHROPIC_API_KEY=sk-ant-xxx
以 # 开头的行为注释,会被忽略
UNI_AGENT_BASE_URL=http://127.0.0.1:11434
UNI_AGENT_API_KEY=any_value
UNI_AGENT_PROVIDER=ollama
UNI_AGENT_MODEL=ollama/qwen3-coder:30b
UNI_AGENT_SMALL_FAST_MODEL=ollama/qwen3-coder:30b
要回复问题请先登录或注册
公告
更多>相关问题