Autobot::Providers::ProviderSpec
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)
SourceInstance methods
auth_header
Sourcedetect_by_base_keyword
Sourcedetect_by_key_prefix
Sourcedisplay_name
Sourcekeywords
Sourcelabel
Sourcelocal?
Sourcemax_tokens_legacy_patterns
Sourcemodel_prefix
Sourceskip_prefixes
Sourcestrip_model_prefix?
Sourceuse_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.