constant

package
v0.1.0-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OLLAMA    = LLMProvider{Name: "ollama", ApiUrl: "http://localhost:11434", Models: []Model{QWEN_3_6}}
	ANTHROPIC = LLMProvider{Name: "anthropic", ApiUrl: "https://api.anthropic.com", Models: []Model{SONNET_4_6, OPUS_4_7}}
	DEEPSEEK  = LLMProvider{Name: "deepseek", ApiUrl: "https://api.deepseek.com", Models: []Model{DEEPSEEK_V4_FLASH, DEEPSEEK_V4_PRO}}
	OPENAI    = LLMProvider{Name: "openai", ApiUrl: "https://api.openai.com", Models: []Model{GPT_5_5}}
)

Use var for struct "constants" Models are ordered by price

View Source
var MODEL_CONTEXT_SIZE = map[Model]int{
	QWEN_3_6:          262_144,
	SONNET_4_6:        500_000,
	OPUS_4_7:          500_000,
	DEEPSEEK_V4_FLASH: 1_000_000,
	DEEPSEEK_V4_PRO:   1_000_000,
	GPT_5_5:           500_000,
}

for completion

Functions

This section is empty.

Types

type AgentStatus

type AgentStatus string
const (
	INIT         AgentStatus = "init"
	DRAINING     AgentStatus = "draining"
	THINKING     AgentStatus = "thinking"
	TEXTING      AgentStatus = "texting"
	EXECUTING    AgentStatus = "executing"
	INTERRUPTED  AgentStatus = "interrupted"
	IDLE         AgentStatus = "idle"
	MAX_ITERS    AgentStatus = "max_iters"
	SAVING       AgentStatus = "saving"
	COMPACTING   AgentStatus = "compacting"
	READY_REPORT AgentStatus = "ready_report"
	SHUTDOWN     AgentStatus = "shutdown"
	CRUSHED      AgentStatus = "crushed"
)

func (AgentStatus) String

func (a AgentStatus) String() string

type LLMProvider

type LLMProvider struct {
	Name   string
	ApiUrl string
	Models []Model
}

func GetAllProviders

func GetAllProviders() []LLMProvider

func GetProvider

func GetProvider(name string) (LLMProvider, bool)

func (LLMProvider) ModelForLevel

func (p LLMProvider) ModelForLevel(level int) Model

ModelForLevel returns the model to use at a given capability tier:

  • level 1 (default) → the smallest / cheapest model the provider lists (Models[0]). Suitable for routine work; "normal" tier.
  • level 2 → the largest model the provider lists (Models[len-1]). Suitable for hard reasoning; "big" tier. More expensive — the LLM should only pick this when the task genuinely needs deeper thinking.

Providers with only one configured model collapse both tiers to that model. Levels outside {1, 2} clamp to the nearest valid tier.

type Model

type Model string
const (
	// OLLAMA
	QWEN_3_6 Model = "qwen3.6"

	// ANTHROPIC
	SONNET_4_6 Model = "claude-sonnet-4-6"
	OPUS_4_7   Model = "claude-opus-4-7"

	// DEEPSEEK
	DEEPSEEK_V4_FLASH Model = "deepseek-v4-flash"
	DEEPSEEK_V4_PRO   Model = "deepseek-v4-pro"

	// OPENAI
	GPT_5_5 Model = "gpt-5.5"
)

func GetModel

func GetModel(name string) (Model, bool)

GetModel resolves a string to its typed Model constant. Mirrors GetProvider; the canonical model registry is MODEL_CONTEXT_SIZE.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL