MCPcopy Create free account
hub / github.com/FareedKhan-dev/ai-long-task / LLMModelConfig

Class LLMModelConfig

config.py:82–115  ·  view source on GitHub ↗

Configuration for a single LLM model within an ensemble.

Source from the content-addressed store, hash-verified

80
81@dataclass
82class LLMModelConfig:
83 """Configuration for a single LLM model within an ensemble."""
84
85 # API configuration
86 api_base: str = None
87 api_key: Optional[str] = None
88 name: str = None
89
90 # Custom LLM client initialization function (optional)
91 init_client: Optional[Callable] = None
92
93 # Weight for this model in the ensemble (used for sampling)
94 weight: float = 1.0
95
96 # Generation parameters
97 system_message: Optional[str] = None
98 temperature: float = None
99 top_p: float = None
100 max_tokens: int = None
101
102 # Request parameters
103 timeout: int = None
104 retries: int = None
105 retry_delay: int = None
106
107 # Reproducibility
108 random_seed: Optional[int] = None
109
110 # Reasoning parameters (for specific models)
111 reasoning_effort: Optional[str] = None
112
113 def __post_init__(self):
114 """Post-initialization to resolve ${VAR} env var references in api_key."""
115 self.api_key = _resolve_env_var(self.api_key)
116
117
118@dataclass

Callers 3

_worker_initFunction · 0.90
__post_init__Method · 0.85
rebuild_modelsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected