Implementation:AISecurityLab Hackagent ProviderConfig
| Knowledge Sources | |
|---|---|
| Domains | Model_Adapter, Configuration |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete AgentType → ProviderConfig lookup table, the single source of truth for how each agent type maps to a LiteLLM call (provider prefix, thinking knob translator, extra request key allow-list, optional custom LLM factory), provided by the HackAgent models package.
Description
The module defines thinking translator functions (default_thinking_translator, openai_thinking_translator) that map the thinking knob to provider-specific request fields. The PROVIDER_CONFIGS table maps each AgentType to a ProviderConfig dataclass with provider prefix, thinking translator, passthrough keys, and optional CustomLLM factory for agent types LiteLLM cannot speak natively (ADK, future MCP/A2A). 'get_provider_config() looks up the config for an agent type.
Usage
- Model building: build_model uses get_provider_config() to translate model configs into LiteLLM calls.
- 'Thinking knob: Thinking translators handle reasoning models (o1, o3, o4, gpt-5/6).
Code Reference
Source Location
- Repository: AISecurityLab_Hackagent
- File: hackagent/models/provider_config.py
Signature
def default_thinking_translator(thinking: Any, *, model_name: str = "") -> Dict[str, Any]: ...
def openai_thinking_translator(thinking: Any, *, model_name: str = "") -> Dict[str, Any]: ...
PROVIDER_CONFIGS: Dict[AgentType, ProviderConfig]
def get_provider_config(agent_type: AgentType) -> Optional[ProviderConfig]: ...
Import
from hackagent.models.provider_config import PROVIDER_CONFIGS, get_provider_config