Class: LLM::OpencodeGo

Inherits:
OpencodeZen show all
Defined in:
lib/brute/providers/opencode_go.rb

Overview

OpenAI-compatible provider for the OpenCode Go API gateway.

OpenCode Go is the low-cost subscription plan with a restricted (lite) model list. Same gateway as Zen, different endpoint path.

Examples:

llm = LLM::OpencodeGo.new(key: ENV["OPENCODE_API_KEY"])
ctx = LLM::Context.new(llm)
ctx.talk "Hello from brute"

Constant Summary

Constants inherited from OpencodeZen

LLM::OpencodeZen::HOST

Instance Method Summary collapse

Methods inherited from OpencodeZen

#audio, #default_model, #files, #images, #initialize, #moderations, #responses, #vector_stores

Constructor Details

This class inherits a constructor from LLM::OpencodeZen

Instance Method Details

#modelsBrute::Providers::ModelsDev

Returns models from the models.dev catalog. Note: The Go gateway only accepts lite-tier models, but models.dev doesn’t distinguish between Zen and Go tiers. We show the full catalog; the gateway returns an error for unsupported models.



33
34
35
# File 'lib/brute/providers/opencode_go.rb', line 33

def models
  Brute::Providers::ModelsDev.new(provider: self, provider_id: "opencode")
end

#nameSymbol

Returns:

  • (Symbol)


23
24
25
# File 'lib/brute/providers/opencode_go.rb', line 23

def name
  :opencode_go
end