Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AISecurityLab Hackagent ProviderConfig

From Leeroopedia
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

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

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment