feat(agents): add static_headers and extra_headers fields to schema and types

Add two new fields to LiteLLM_AgentsTable:
- static_headers (Json): admin-configured headers always sent to the backend agent
- extra_headers (String[]): header names to extract from the client request and forward

Extend AgentConfig, PatchAgentRequest, and AgentResponse with the same fields.
Also remove duplicate spec_path field from LiteLLM_MCPServerTable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sameer Kankute 2026-03-05 14:27:51 +05:30
parent cdf2d67fc8
commit 028e6871dd
2 changed files with 8 additions and 1 deletions

View file

@ -63,6 +63,8 @@ model LiteLLM_AgentsTable {
agent_name String @unique
litellm_params Json?
agent_card_params Json
static_headers Json? @default("{}")
extra_headers String[] @default([])
agent_access_groups String[] @default([])
object_permission_id String?
object_permission LiteLLM_ObjectPermissionTable? @relation(fields: [object_permission_id], references: [object_permission_id])
@ -305,7 +307,6 @@ model LiteLLM_MCPServerTable {
registration_url String?
allow_all_keys Boolean @default(false)
available_on_public_internet Boolean @default(true)
spec_path String?
is_byok Boolean @default(false)
byok_description String[] @default([])
byok_api_key_help_url String?

View file

@ -179,6 +179,8 @@ class AgentConfig(TypedDict, total=False):
agent_card_params: Required[AgentCard]
litellm_params: Dict[str, Any] # allow for any future litellm params
object_permission: AgentObjectPermission
static_headers: Optional[Dict[str, str]]
extra_headers: Optional[List[str]]
class PatchAgentRequest(TypedDict, total=False):
@ -186,6 +188,8 @@ class PatchAgentRequest(TypedDict, total=False):
agent_card_params: AgentCard
litellm_params: Dict[str, Any]
object_permission: AgentObjectPermission
static_headers: Optional[Dict[str, str]]
extra_headers: Optional[List[str]]
# Request/Response models for CRUD endpoints
@ -197,6 +201,8 @@ class AgentResponse(BaseModel):
litellm_params: Optional[Dict[str, Any]] = None
agent_card_params: Dict[str, Any]
object_permission: Optional[Dict[str, Any]] = None
static_headers: Optional[Dict[str, str]] = None
extra_headers: Optional[List[str]] = None
created_at: Optional[datetime] = None
updated_at: Optional[datetime] = None
created_by: Optional[str] = None