Module: RubyLLM::Providers::DeepSeek::Capabilities
- Defined in:
- lib/ruby_llm/providers/deepseek/capabilities.rb
Overview
Provider-level capability checks used outside the model registry.
Constant Summary collapse
- DEFAULT_CONTEXT_WINDOW =
1_000_000- DEFAULT_MAX_OUTPUT_TOKENS =
384_000- DEFAULT_PRICES =
{ input: 0.14, output: 0.28, cache_read: 0.0028 }.freeze
- PRO_PRICES =
{ input: 0.435, output: 0.87, cache_read: 0.003625 }.freeze
Class Method Summary collapse
- .context_window_for(_model_id) ⇒ Object
- .critical_capabilities_for(model_id) ⇒ Object
- .max_tokens_for(_model_id) ⇒ Object
- .pricing_for(model_id) ⇒ Object
- .supports_tool_choice?(_model_id) ⇒ Boolean
- .supports_tool_parallel_control?(_model_id) ⇒ Boolean
Class Method Details
.context_window_for(_model_id) ⇒ Object
31 32 33 |
# File 'lib/ruby_llm/providers/deepseek/capabilities.rb', line 31 def context_window_for(_model_id) DEFAULT_CONTEXT_WINDOW end |
.critical_capabilities_for(model_id) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/ruby_llm/providers/deepseek/capabilities.rb', line 39 def critical_capabilities_for(model_id) v4_model = model_id.start_with?('deepseek-v4-') capabilities = ['function_calling'] capabilities << 'structured_output' if v4_model capabilities << 'reasoning' if model_id == 'deepseek-reasoner' || v4_model capabilities end |
.max_tokens_for(_model_id) ⇒ Object
35 36 37 |
# File 'lib/ruby_llm/providers/deepseek/capabilities.rb', line 35 def max_tokens_for(_model_id) DEFAULT_MAX_OUTPUT_TOKENS end |
.pricing_for(model_id) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/ruby_llm/providers/deepseek/capabilities.rb', line 47 def pricing_for(model_id) prices = model_id == 'deepseek-v4-pro' ? PRO_PRICES : DEFAULT_PRICES { text_tokens: { standard: { input_per_million: prices[:input], output_per_million: prices[:output], cache_read_input_per_million: prices[:cache_read] } } } end |
.supports_tool_choice?(_model_id) ⇒ Boolean
23 24 25 |
# File 'lib/ruby_llm/providers/deepseek/capabilities.rb', line 23 def supports_tool_choice?(_model_id) true end |
.supports_tool_parallel_control?(_model_id) ⇒ Boolean
27 28 29 |
# File 'lib/ruby_llm/providers/deepseek/capabilities.rb', line 27 def supports_tool_parallel_control?(_model_id) false end |