CrucibleIR.Backend.Options (CrucibleIR v0.3.0)

View Source

Generation options for backend requests.

These options normalize common LLM parameters across providers while keeping a safe escape hatch via extra for provider-specific settings.

Fields

  • :model - Model name or ID
  • :temperature - Sampling temperature
  • :max_tokens - Maximum tokens to generate
  • :top_p - Nucleus sampling probability
  • :top_k - Top-k sampling
  • :frequency_penalty - Penalize frequent tokens
  • :presence_penalty - Penalize repeated tokens
  • :stop - Stop sequences
  • :response_format - Response format (:text, :json, :json_schema)
  • :json_schema - JSON schema for structured output
  • :stream - Whether to stream responses
  • :cache_control - Caching policy (:ephemeral)
  • :extended_thinking - Enable extended reasoning (provider-specific)
  • :thinking_budget_tokens - Token budget for extended thinking
  • :seed - Random seed for reproducibility
  • :timeout_ms - Request timeout in milliseconds
  • :extra - Provider-specific options

Examples

iex> %CrucibleIR.Backend.Options{model: "gpt-4o", temperature: 0.2}

Summary

Types

cache_control()

@type cache_control() :: :ephemeral | atom()

response_format()

@type response_format() :: :text | :json | :json_schema | atom()

t()

@type t() :: %CrucibleIR.Backend.Options{
  cache_control: cache_control() | nil,
  extended_thinking: boolean(),
  extra: map(),
  frequency_penalty: float() | nil,
  json_schema: map() | nil,
  max_tokens: non_neg_integer() | nil,
  model: String.t() | nil,
  presence_penalty: float() | nil,
  response_format: response_format() | nil,
  seed: integer() | nil,
  stop: [String.t()] | nil,
  stream: boolean(),
  temperature: float() | nil,
  thinking_budget_tokens: non_neg_integer() | nil,
  timeout_ms: non_neg_integer() | nil,
  top_k: non_neg_integer() | nil,
  top_p: float() | nil
}