Skip to content

fix(agents): route worker models by available profiles - #18

Closed
guustavomv wants to merge 1 commit into
verbeux-ai:mainfrom
guustavomv:fix/agent-profile-routing
Closed

guustavomv wants to merge 1 commit into
verbeux-ai:mainfrom
guustavomv:fix/agent-profile-routing

Conversation

@guustavomv

Copy link
Copy Markdown

Summary

  • resolve semantic agent profiles (fast, review, coding, testing, and balanced) against the authenticated Verboo /models catalog
  • preserve the full catalog model ID, including plan prefixes such as max/qwen3.6-27b
  • make tool-specified Claude aliases (haiku, sonnet, and opus) inherit the parent model on non-Claude-native providers
  • support model: profile:<name> in forked and inline skills while keeping existing external-provider routing compatible
  • route the built-in read-only Explore agent through the fast profile and bound it to four turns
  • document profile configuration and add routing diagnostics

Motivation and runtime evidence

The planner itself was running on gpt-5.6-sol, but delegated calls could fail or take a long time because the harness forwarded model identifiers that the active provider did not expose.

Observed in real Verboo transcripts before this fix:

  • worker-tests sent the unqualified ID qwen3.6-27b; the authenticated catalog exposed max/qwen3.6-27b, so the call failed before editing any file
  • after switching the skill to a semantic value, an old runtime forwarded profile:balanced literally instead of resolving it
  • the built-in Plan agent attempted sonnet and then opus; both finished with 0 tool uses, 0 tokens, and 0 seconds because those aliases were unavailable on the current provider

Observed with the catalog-aware Explore route:

  • the main planner remained gpt-5.6-sol
  • Explore requests expressed as haiku executed with the available fast model max/deepseek-v4-flash

This change makes the same behavior general across account plans: profiles choose the best preferred model that is actually returned by /models, then preserve its canonical ID. If no candidate is available, the agent inherits the parent model unless first-available is explicitly configured.

Impact

  • user-facing impact: plans no longer stall on unavailable Claude aliases or fail because a plan-qualified Verboo model prefix was omitted; worker and reviewer skills can use portable semantic profiles
  • developer/maintainer impact: routing decisions are centralized, schema-validated, covered by focused tests, and visible in debug logs

Testing

  • bun run build
  • bun run smoke
  • focused tests: bun test src/utils/model/agent.test.ts src/services/api/agentRouting.test.ts src/query/model.test.ts src/tools/SkillTool/SkillTool.test.ts src/skills/loadSkillsDir.test.ts (64 pass, 0 fail)

Notes

  • provider/model path tested: Verboo/Codex planner gpt-5.6-sol, catalog-qualified worker IDs, and non-Claude-native alias fallback
  • screenshots attached (if UI changed): not applicable; this changes runtime routing and diagnostics
  • follow-up work or known limitations: the process must be restarted after rebuilding so an already-running CLI loads the new bundle; personal ~/.verboo skill/settings changes are intentionally not part of this repository PR

@ImPedro29

Copy link
Copy Markdown

Obrigado pela contribuição, @guustavomv. O #20 já foi mesclado e incorpora os pontos centrais deste PR: IDs canônicos com prefixo de plano, perfis semânticos fast/review/coding/testing/balanced, suporte a profile: em skills inline e forked, fallback seguro dos aliases Claude e diagnósticos de roteamento. A solução mesclada também mantém os papéis anunciados pelo router como autoritativos e acrescenta limites de execução, timeout com resultado parcial e garantia de pareamento tool_use/tool_result. Por isso, este PR ficou substituído pelo #20 e será encerrado. Valeu por levantar o problema e pela base das melhorias de catálogo e perfis.

@ImPedro29 ImPedro29 closed this Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants