advisor

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 6 Imported by: 0

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

func New(key, model string) *Advisor

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

func (a *Advisor) Advise(ctx context.Context, question, effort string) (string, error)

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).

func (*Advisor) Available

func (a *Advisor) Available() bool

Available reports whether the advisor has a key (so callers can hide the option).

Jump to

Keyboard shortcuts

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