Documentation
¶
Overview ¶
Package advisor is memcode's "second opinion" side-channel: it asks a frontier model from a DIFFERENT vendor (Claude Opus, adaptive thinking on) to advise the best path forward on a situation or a plan. This is NOT a coding-inference backend (the two-backend doctrine — OpenAI + Fireworks — still governs that); it's an advisory tool the user invokes deliberately (/advisor, or "Ask an advisor" in plan mode), automating the manual "paste it into Claude" loop. Using the cross-vendor frontier model is the point — a second opinion from the SAME vendor that serves inference would be an echo chamber.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advisor ¶
type Advisor struct {
// contains filtered or unexported fields
}
Advisor asks the cross-vendor frontier model via the SHARED Messages adapter (providers/anthropic) — no wire code of its own.
func New ¶
New returns an advisor. model defaults to Claude Sonnet (catalog.ModelSonnet); override with ANTHROPIC_ADVISOR_MODEL. An empty key yields an advisor whose Advise returns a clear "not configured" error (never panics).
func (*Advisor) Advise ¶
Advise asks the model to advise on question. effort is the reasoning depth (none|low|medium|high|xhigh); "" defaults to high. Returns the advice text.
func (*Advisor) AdviseMetered ¶
func (a *Advisor) AdviseMetered(ctx context.Context, question, effort string) (string, wire.Response, error)
AdviseMetered is Advise plus the usage the call billed, so the gateway can record this side-channel into the shared Ledger — the advisor is the most expensive model in the system and was previously unmetered (invisible spend).