struct

Autobot::Providers::ProviderSpec

Inherits Struct < Value < Object

Metadata for a single LLM provider. Drives env setup, model prefixing, gateway detection, and display — no if-elif chains needed in provider code.

Constructors

new(name : String, keywords : Array(String), display_name : String = "", api_url : String = "", auth_header : String = "Authorization", model_prefix : String = "", skip_prefixes : Array(String) = [] of String, gateway : Bool = false, local : Bool = false, detect_by_key_prefix : String = "", detect_by_base_keyword : String = "", strip_model_prefix : Bool = false, model_overrides : Hash(String, Hash(String, JSON::Any)) = {} of String => Hash(String, JSON::Any), use_max_completion_tokens : Bool = false, max_tokens_legacy_patterns : Array(String) = [] of String, user_agent : Nil | String = nil, supports_system_role : Bool = true)
Source

Instance methods

api_url

API

Source
auth_header
Source
detect_by_base_keyword
Source
detect_by_key_prefix
Source
display_name
Source
gateway?

Gateway / local detection

Source
keywords
Source
label
Source
local?
Source
max_tokens_legacy_patterns
Source
model_overrides

Per-model parameter overrides, e.g. {"kimi-k2.5" => {"temperature" => 1.0}}

Source
model_prefix
Source
name

Identity

Source
skip_prefixes
Source
strip_model_prefix?
Source
supports_system_role?

Whether the provider supports the "system" role in messages

Source
use_max_completion_tokens?

Legacy model patterns that still use max_tokens instead of max_completion_tokens. New OpenAI models (GPT-5+, o-series) all use max_completion_tokens.

Source
user_agent

Specific User-Agent required by some providers (e.g. Kimi)

Source