feat: add Osaurus API authentication support

- Add OSAURUS_API_KEY config for Bearer token authentication
- Handle Osaurus streaming format responses even with stream: false
- Update .env.example with Osaurus configuration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hotwa
2026-03-22 15:20:40 +08:00
parent 2451c35f9d
commit 587e319520
3 changed files with 83 additions and 14 deletions

View File

@@ -1,9 +1,12 @@
# 下游 Ollama 地址
OLLAMA_PROXY_TARGET=http://127.0.0.1:11434
# 默认模型名 (可以为空,如果需要强制指定一个,也可以从配置中配)
# OLLAMA_DEFAULT_MODEL=Huihui-Qwen3.5-27B-Claude-4.6-Opus-abliterated-4bit
# 默认模型名
OLLAMA_DEFAULT_MODEL=hotwa/qwen35-opus-distilled-agent:latest
# 代理服务监听端口
PROXY_PORT=11435
PROXY_HOST=127.0.0.1
# Osaurus API Key (可选,如果下游需要认证)
# OSAURUS_API_KEY=your-api-key-here