picoclaw/pkg
xiaoen 02e8192349 feat(agent): wire model routing into the agent loop
instance.go:
  - Add Router *routing.Router and LightCandidates []FallbackCandidate
    to AgentInstance.
  - At agent creation, when routing.enabled and light_model resolves
    successfully in model_list, pre-build the Router and resolve the
    light model candidates once. If the light model isn't in model_list,
    log a warning and disable routing for that agent gracefully.

loop.go:
  - Add selectCandidates(agent, userMsg, history) helper.
    It calls Router.SelectModel and returns either agent.Candidates /
    agent.Model (primary tier) or agent.LightCandidates / light_model
    (light tier). Returns primary unchanged when routing is disabled.
  - In runLLMIteration, resolve (activeCandidates, activeModel) once
    before entering the tool-iteration loop. The model tier is sticky
    for the entire turn so a multi-step tool chain doesn't switch
    models mid-way.
  - Replace hard-coded agent.Candidates / agent.Model references in
    callLLM and the debug log with the resolved active values.

The fallback chain and retry logic are untouched. When light_model
returns an error the fallback chain handles escalation normally.
2026-03-02 22:42:52 +08:00
..
agent feat(agent): wire model routing into the agent loop 2026-03-02 22:42:52 +08:00
auth feat: add picoclaw-launcher with web UI for configuration and gateway management (#904) 2026-02-28 18:38:38 +08:00
bus chore: resolve conflicts with upstream/main 2026-02-28 12:21:54 +08:00
channels Merge pull request #893 from reevoid/rui-dev 2026-03-02 21:50:21 +08:00
config feat(config): add RoutingConfig to AgentDefaults 2026-03-02 22:40:52 +08:00
constants refactor: replace bool map with set-style map for internal channels (#472) 2026-02-19 11:48:17 +01:00
cron style: fix gci import grouping in config, cron, and skills installer 2026-02-26 20:38:11 +08:00
devices refactor: cleanup dead code and turn on dead code detection in CI (#515) 2026-02-24 21:52:25 +08:00
fileutil refactor(pkg): move atomic file write to dedicated fileutil package 2026-02-24 23:57:13 +08:00
health chore: resolve conflicts with upstream/main 2026-02-28 12:21:54 +08:00
heartbeat enable dupl check 2026-03-01 18:17:32 +11:00
identity feat(identity): add unified user identity with canonical platform:id format 2026-02-23 06:56:48 +08:00
logger enable prealloc 2026-02-25 21:31:07 +11:00
media chore: resolve conflicts with upstream/main 2026-02-28 12:21:54 +08:00
migrate enable dupl check 2026-03-01 18:17:32 +11:00
providers Merge pull request #535 from xiaket/ci-enable-dupl-linter 2026-03-02 18:55:35 +08:00
routing feat(routing): add language-agnostic model complexity scorer 2026-03-02 22:42:20 +08:00
session feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
skills Merge pull request #861 from p3ddd/refactor/modernize 2026-03-01 15:38:59 +08:00
state fix: error check on state (#864) 2026-03-02 11:59:26 +11:00
tools fix(tools): allow /dev/null redirection and add read/write sandbox split (#967) 2026-03-02 12:22:02 +08:00
utils fix(tools): close resp.Body on retry cancel and cache http.Client instances (#940) 2026-03-01 16:55:46 +11:00
voice feat(linter): Fix govet linter 2026-02-20 22:35:16 +02:00