-
Notifications
You must be signed in to change notification settings - Fork 250
Open
Description
Description
The LLM model pool currently supports api_key and base_url configuration, but has no way to attach custom HTTP headers. This is needed for gateway authentication, vendor-specific auth supplements, or routing headers required by self-hosted proxies.
What to do
- Database — Add
headers_encrypted(TEXT) column tollm_modelstable via Alembic migration - Security — Add
encrypt_symmetric/decrypt_symmetrichelpers (AES-GCM) tobackend/app/core/security.py - Model — Add
headers_encrypted: Mapped[str | None]field toLLMModelinbackend/app/models/llm.py - Schemas — Add
headers: dict | None = NonetoLLMModelCreate,LLMModelUpdate,LLMModelOutinbackend/app/schemas/schemas.py - API — Encrypt on write and pass through in
backend/app/api/enterprise.py - LLM Client — Accept and merge custom headers in
LLMClient,OpenAICompatibleClient,AnthropicClient,create_llm_client,chat_complete,chat_stream - Call sites — Decrypt and forward
headersinwebsocket.py,agent_tools.py,task_executor.py,heartbeat.py,scheduler.py,supervision_reminder.py - Frontend — Replace raw JSON textarea with a key-value row editor; mask values with
type="password"inputs
Resources
- LLM model pool config:
backend/app/models/llm.py - Enterprise API:
backend/app/api/enterprise.py - LLM client:
backend/app/services/llm_client.py - Frontend settings page:
frontend/src/pages/EnterpriseSettings.tsx - Migrations:
backend/alembic/versions/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels