Skip to main content

Overview

The llm section controls all language model settings including API endpoints, model selection, generation parameters, and retry behavior.

Basic Configuration

Model Configuration

Single Model

Configure a single model for solution generation:

Multiple Models

Use multiple models with weighted sampling:
SkyDiscover randomly samples models based on their weights. In this example, gpt-5 is selected 70% of the time.

Provider-Specific Models

Use the provider/model format to specify different providers:

Supported Providers

SkyDiscover supports multiple LLM providers with automatic API base URL and key resolution:
Environment variables: OPENAI_API_KEYAutomatically detected for models starting with: gpt-, o1, o3, o4
Environment variables: ANTHROPIC_API_KEYAutomatically detected for models starting with: claude-
Environment variables: GEMINI_API_KEY, GOOGLE_API_KEYAutomatically detected for models starting with: gemini-
Environment variables: DEEPSEEK_API_KEYAutomatically detected for models starting with: deepseek-
Environment variables: MISTRAL_API_KEYAutomatically detected for models starting with: mistral-
No environment variables required. Specify api_base for your local Ollama instance.
No environment variables required. Specify api_base for your vLLM server.

LLMConfig Parameters

Defined in skydiscover/config.py:151-224

API Settings

str
default:"https://api.openai.com/v1"
Base URL for the LLM API endpoint
str
default:"None"
API key for authentication. Auto-resolved from environment if not specified

Model Selection

List[LLMModelConfig]
default:"[]"
List of models for solution generation. Each model can have individual settings
List[LLMModelConfig]
default:"[]"
Models for evaluation. Defaults to same as models if not specified
List[LLMModelConfig]
default:"[]"
Models for guide tasks (idea generation, paradigm breakthroughs). Defaults to models

Generation Parameters

float
default:"0.7"
Sampling temperature (0.0-2.0). Higher values increase randomness
float
default:"0.95"
Nucleus sampling threshold (0.0-1.0). Alternative to temperature
int
default:"32000"
Maximum tokens to generate in a single completion
str
default:"system_message"
System message for the model. Usually set in prompt section instead

Request Parameters

int
default:"600"
Request timeout in seconds
int
default:"3"
Number of retry attempts on failure
int
default:"5"
Delay in seconds between retries

Reasoning Parameters

str
default:"None"
Reasoning effort level for o1-series models: low, medium, or high

LLMModelConfig Parameters

Per-model configuration (defined in skydiscover/config.py:121-148):
str
default:"None"
Model identifier (e.g., gpt-5, anthropic/claude-opus-3)
float
default:"1.0"
Sampling weight for this model in the pool
str
default:"None"
Override API base URL for this specific model
str
default:"None"
Override API key for this specific model
Callable
default:"None"
Custom LLM client initialization function
All generation and request parameters can also be overridden per-model.

Advanced Examples

LLM-as-a-Judge

Use separate models for generation and evaluation:
configs/llm_judge.yaml

Mixed Provider Setup

Reasoning Models (o1-series)

CLI Overrides

Override model settings from the command line:
See skydiscover/config.py:819-910 for override implementation.

Environment Variables

Provider-specific API keys are automatically resolved:

Next Steps

Prompt Configuration

Configure system messages and prompt templates

Search Configuration

Configure evolutionary search algorithms