Class: Smith::Models::Profile
- Inherits:
-
Data
- Object
- Data
- Smith::Models::Profile
- Defined in:
- lib/smith/models/profile.rb
Overview
Immutable capability record for a model id. Holds only inherent provider/model properties — never pricing, never API keys, never request-specific data. Library-shipped rules live in Smith::Models::Inference (pattern-based).
Fields:
model_id — canonical id ("claude-opus-4-7")
provider — :anthropic | :openai | :gemini | :xai | ...
thinking_shape — nil | :budget_tokens | :reasoning_effort | :adaptive
nil — model has no thinking concept (don't send thinking)
:budget_tokens — RubyLLM's default Anthropic shape (Opus 4.6, Sonnet 4.x)
:reasoning_effort — OpenAI-style reasoning_effort string
:adaptive — Opus 4.7+ adaptive shape (output_config.effort)
accepts_temperature — false → normalizer strips @temperature
tools_with_thinking_native — true → tools + thinking on default endpoint OK
tools_with_thinking_route — nil | :responses (which endpoint to route to
when both tools + thinking are present and
native combo is unsupported)
Instance Attribute Summary collapse
-
#accepts_temperature ⇒ Object
readonly
Returns the value of attribute accepts_temperature.
-
#model_id ⇒ Object
readonly
Returns the value of attribute model_id.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#thinking_shape ⇒ Object
readonly
Returns the value of attribute thinking_shape.
-
#tools_with_thinking_native ⇒ Object
readonly
Returns the value of attribute tools_with_thinking_native.
-
#tools_with_thinking_route ⇒ Object
readonly
Returns the value of attribute tools_with_thinking_route.
Instance Method Summary collapse
-
#endpoint_mode ⇒ Object
Derived from tools_with_thinking_route.
Instance Attribute Details
#accepts_temperature ⇒ Object (readonly)
Returns the value of attribute accepts_temperature
23 24 25 |
# File 'lib/smith/models/profile.rb', line 23 def accepts_temperature @accepts_temperature end |
#model_id ⇒ Object (readonly)
Returns the value of attribute model_id
23 24 25 |
# File 'lib/smith/models/profile.rb', line 23 def model_id @model_id end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider
23 24 25 |
# File 'lib/smith/models/profile.rb', line 23 def provider @provider end |
#thinking_shape ⇒ Object (readonly)
Returns the value of attribute thinking_shape
23 24 25 |
# File 'lib/smith/models/profile.rb', line 23 def thinking_shape @thinking_shape end |
#tools_with_thinking_native ⇒ Object (readonly)
Returns the value of attribute tools_with_thinking_native
23 24 25 |
# File 'lib/smith/models/profile.rb', line 23 def tools_with_thinking_native @tools_with_thinking_native end |
#tools_with_thinking_route ⇒ Object (readonly)
Returns the value of attribute tools_with_thinking_route
23 24 25 |
# File 'lib/smith/models/profile.rb', line 23 def tools_with_thinking_route @tools_with_thinking_route end |
Instance Method Details
#endpoint_mode ⇒ Object
Derived from tools_with_thinking_route. Exposed on Profile (not on Tool::Compatibility) so the Profile is a self-contained capability record without cross-namespace dependency.
34 35 36 |
# File 'lib/smith/models/profile.rb', line 34 def endpoint_mode tools_with_thinking_route == :responses ? :responses : :chat_completions end |