Skip to content

Settings

Settings are read from environment variables only; no file is loaded. In Python, pass LPGCastSettings(...) to LPGCaster instead.

Model

Variable Default Meaning
LPGCAST_LLM_MODEL gpt-5.6-luna Model name sent to the endpoint. The default is an OpenAI model; set it for any other endpoint.
LPGCAST_LLM_BASE_URL unset Endpoint base URL, e.g. http://localhost:11434/v1 for Ollama. Unset means OpenAI.
LPGCAST_LLM_API_KEY unset API key. Required for any provider call, including to endpoints that ignore it (set any value for a local server). Without one only cached responses are served.
LPGCAST_LLM_TEMPERATURE unset Sampling temperature. Unset sends none: the model's default.
LPGCAST_LLM_REASONING_EFFORT unset Passed through to models that accept reasoning_effort.
LPGCAST_LLM_MAX_OUTPUT_TOKENS unset Output ceiling per call: max_completion_tokens to OpenAI, max_tokens to any other endpoint.
LPGCAST_LLM_RESPONSE_FORMAT auto json_schema sends the instance schema for strict decoding; json_object asks for JSON and puts the schema in the prompt; auto tries json_schema and falls back to json_object for the rest of the run when the endpoint rejects it.
LPGCAST_LLM_REQUEST_TIMEOUT_SECONDS 120.0 Per-request timeout.
LPGCAST_LLM_TRANSPORT_RETRIES 2 SDK retries on connection errors, 429 and 5xx.
LPGCAST_LLM_PARSE_RETRIES 2 Re-asks after a response that is not a JSON object, with the parse error shown to the model.
LPGCAST_LLM_MAX_INFLIGHT 8 Concurrent provider requests per event loop.

Response cache

Variable Default Meaning
LPGCAST_CACHE_ENABLED true Read and write cached responses.
LPGCAST_CACHE_DIR unset Cache directory. Unset: ./.test_cache under pytest, else $XDG_CACHE_HOME/lpgcast or ~/.cache/lpgcast.
LPGCAST_CACHE_READ_ONLY false Serve cached responses but write no new ones.
LPGCAST_CACHE_REQUIRE_HIT false A cache miss raises instead of calling the model: a replay that provably makes no request.

Cast

Variable Default Meaning
LPGCAST_MAX_EPISODE_TOKENS 4000 Ceiling on an episode's estimated tokens (characters / 4). Episodes are never chunked: one over the ceiling is refused before any call.
LPGCAST_SLICE_MAX_TOKENS 4000 Token budget of the schema slice.
LPGCAST_SLICE_MAX_ELEMENTS 60 Vertex and edge budget of the schema slice.
LPGCAST_USER_INSTRUCTION unset Extra guidance placed after the rules, before the text.

Service

Variable Default Meaning
LPGCAST_SERVE_API_KEY unset Bearer token every request but /health must carry. Without one the service refuses to cast unless allow_anonymous is set.
LPGCAST_SERVE_ALLOW_ANONYMOUS false Serve without a key; for local development only.
LPGCAST_SERVE_MAX_EPISODES 200 Most episodes one request may carry.
LPGCAST_SERVE_HOST 127.0.0.1 Address to bind.
LPGCAST_SERVE_PORT 8997 Port to bind.