Add Anthropic Messages API compatibility layer (/v1/messages)
- POST /v1/messages endpoint with full quota enforcement and auth - Accepts x-api-key and anthropic-auth-token headers (for Claude Code) - Transforms Anthropic request/response format ↔ Ollama /api/chat - Streaming support via Anthropic SSE format - Tool use support (request and response transformation) - ANTHROPIC_DEFAULT_MODEL env var for model selection without admin UI - BACKEND_API_KEY env var for forwarding auth to upstream proxies - Fix SQLite path always resolved relative to database.py location - start.sh and start_claude.sh load .env relative to script location
This commit is contained in:
@@ -16,3 +16,8 @@ DATABASE_URL=sqlite:///./test.db
|
||||
OLLAMA_URL=http://localhost:11434
|
||||
DEFAULT_MODEL=llama3
|
||||
APP_TZ=Europe/Berlin
|
||||
|
||||
# Standard-Modell für den Anthropic-kompatiblen Endpunkt (/v1/messages)
|
||||
# Wird verwendet, wenn der Client kein Modell angibt oder ein Anthropic-Modellname
|
||||
# (z.B. claude-opus-4-7) auf kein lokales Modell passt.
|
||||
ANTHROPIC_DEFAULT_MODEL=llama3
|
||||
|
||||
Reference in New Issue
Block a user