Skip to content
Navigation

Configuration types for models, agents, tasks, and runs in the Orbiter framework.

Module: orbiter.config

python
from orbiter.config import (
    parse_model_string,
    ModelConfig,
    AgentConfig,
    TaskConfig,
    RunConfig,
)

parse_model_string()

python
def parse_model_string(model: str) -> tuple[str, str]

Split a model string into provider and model name.

Parses the "provider:model_name" format. If no colon is present, defaults the provider to "openai".

Parameters

NameTypeDefaultDescription
modelstr(required)Model string, e.g. "openai:gpt-4o" or "gpt-4o".

Returns

A (provider, model_name) tuple of strings.

Example

python
from orbiter.config import parse_model_string

provider, model_name = parse_model_string("openai:gpt-4o")
# provider = "openai", model_name = "gpt-4o"

provider, model_name = parse_model_string("gpt-4o")
# provider = "openai", model_name = "gpt-4o"

provider, model_name = parse_model_string("anthropic:claude-3-opus")
# provider = "anthropic", model_name = "claude-3-opus"

ModelConfig

python
class ModelConfig(BaseModel)

Configuration for an LLM provider connection. Immutable (frozen Pydantic model).

Fields

NameTypeDefaultDescription
providerstr"openai"Provider name, e.g. "openai" or "anthropic".
model_namestr"gpt-4o"Model identifier within the provider.
api_keystr | NoneNoneAPI key for authentication.
base_urlstr | NoneNoneCustom API base URL.
max_retriesint3Maximum number of retries on transient failures. Must be >= 0.
timeoutfloat30.0Request timeout in seconds. Must be > 0.

Example

python
from orbiter.config import ModelConfig

config = ModelConfig(
    provider="openai",
    model_name="gpt-4o",
    api_key="sk-...",
    timeout=60.0,
)

AgentConfig

python
class AgentConfig(BaseModel)

Configuration for an Agent. Immutable (frozen Pydantic model).

Fields

NameTypeDefaultDescription
namestr(required)Unique identifier for the agent.
modelstr"openai:gpt-4o"Model string in "provider:model_name" format.
instructionsstr""System prompt for the agent.
temperaturefloat1.0LLM sampling temperature. Must be between 0.0 and 2.0.
max_tokensint | NoneNoneMaximum output tokens per LLM call.
max_stepsint10Maximum LLM-tool round-trips. Must be >= 1.

Example

python
from orbiter.config import AgentConfig

config = AgentConfig(
    name="researcher",
    model="anthropic:claude-3-opus",
    instructions="You are a research assistant.",
    temperature=0.7,
    max_steps=20,
)

TaskConfig

python
class TaskConfig(BaseModel)

Configuration for a task. Immutable (frozen Pydantic model).

Fields

NameTypeDefaultDescription
namestr(required)Unique identifier for the task.
descriptionstr""Human-readable description of what the task does.

Example

python
from orbiter.config import TaskConfig

config = TaskConfig(
    name="summarize",
    description="Summarize a document into key points.",
)

RunConfig

python
class RunConfig(BaseModel)

Configuration for a single run invocation. Immutable (frozen Pydantic model).

Fields

NameTypeDefaultDescription
max_stepsint10Maximum LLM-tool round-trips for this run. Must be >= 1.
timeoutfloat | NoneNoneOverall timeout in seconds for the run.
streamboolFalseWhether to enable streaming output.
verboseboolFalseWhether to enable verbose logging.

Example

python
from orbiter.config import RunConfig

config = RunConfig(
    max_steps=20,
    timeout=120.0,
    stream=True,
    verbose=True,
)