Class: LLM::OpencodeZen
- Inherits:
-
OpenAI
- Object
- OpenAI
- LLM::OpencodeZen
- Defined in:
- lib/brute/providers/opencode_zen.rb
Overview
OpenAI-compatible provider for the OpenCode Zen API gateway.
OpenCode Zen is a curated model gateway at opencode.ai that proxies requests to upstream LLM providers (Anthropic, OpenAI, Google, etc.). All models are accessed via the OpenAI-compatible chat completions endpoint; the gateway handles format conversion internally.
Direct Known Subclasses
Constant Summary collapse
- HOST =
"opencode.ai"
Instance Method Summary collapse
- #audio ⇒ Object
-
#default_model ⇒ String
Returns the default model.
- #files ⇒ Object
- #images ⇒ Object
-
#initialize(key: "public") ⇒ OpencodeZen
constructor
A new instance of OpencodeZen.
-
#models ⇒ Brute::Providers::ModelsDev
Returns models from the models.dev catalog for the opencode provider.
- #moderations ⇒ Object
- #name ⇒ Symbol
-
#responses ⇒ Object
– Unsupported sub-APIs –.
- #vector_stores ⇒ Object
Constructor Details
#initialize(key: "public") ⇒ OpencodeZen
Returns a new instance of OpencodeZen.
38 39 40 |
# File 'lib/brute/providers/opencode_zen.rb', line 38 def initialize(key: "public", **) super(host: HOST, key: key, **) end |
Instance Method Details
#audio ⇒ Object
66 |
# File 'lib/brute/providers/opencode_zen.rb', line 66 def audio = raise(NotImplementedError, "Not supported via Zen gateway") |
#default_model ⇒ String
Returns the default model.
51 52 53 |
# File 'lib/brute/providers/opencode_zen.rb', line 51 def default_model "zen-bickpickle" end |
#files ⇒ Object
67 |
# File 'lib/brute/providers/opencode_zen.rb', line 67 def files = raise(NotImplementedError, "Not supported via Zen gateway") |
#images ⇒ Object
65 |
# File 'lib/brute/providers/opencode_zen.rb', line 65 def images = raise(NotImplementedError, "Not supported via Zen gateway") |
#models ⇒ Brute::Providers::ModelsDev
Returns models from the models.dev catalog for the opencode provider.
58 59 60 |
# File 'lib/brute/providers/opencode_zen.rb', line 58 def models Brute::Providers::ModelsDev.new(provider: self, provider_id: "opencode") end |
#moderations ⇒ Object
68 |
# File 'lib/brute/providers/opencode_zen.rb', line 68 def moderations = raise(NotImplementedError, "Not supported via Zen gateway") |
#name ⇒ Symbol
44 45 46 |
# File 'lib/brute/providers/opencode_zen.rb', line 44 def name :opencode_zen end |
#responses ⇒ Object
– Unsupported sub-APIs –
64 |
# File 'lib/brute/providers/opencode_zen.rb', line 64 def responses = raise(NotImplementedError, "Use chat completions via the Zen gateway") |
#vector_stores ⇒ Object
69 |
# File 'lib/brute/providers/opencode_zen.rb', line 69 def vector_stores = raise(NotImplementedError, "Not supported via Zen gateway") |