feat(lumabot): tool só de leitura não deve bloquear o fallback da cadeia

Closed
#391 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, node.js
Domain
ai, backend

Research direction

Read apps/lumabot/src/plugins/ai/ai.ts around line 356 and inspect the AiTool definitions for search_web, transcribe_audio, and summarize_chat. First resolve the dependency on #390, which determines when a tool counts as started. Add a test where a read-only tool runs and the next model step returns 503; done means fallback reaches the next model and it responds.

Written by the indexing model from the issue text.

Description

area:plugin type:feature

Encontrado na revisão do #386.

Problema

Em apps/lumabot/src/plugins/ai/ai.ts (linha ~356), qualquer tool chamada numa tentativa impede o fallback: se o passo seguinte do modelo der 429/5xx, o erro é relançado em vez de passar para o próximo item da cadeia.

A regra existe para não repetir efeito (lembrete, figurinha, persona), mas também pega tools só de leitura: search_web, transcribe_audio, summarize_chat. Nesses casos repetir é inofensivo, e o usuário recebe "Tô sem cabeça agora" à toa.

Correção sugerida

Campo opcional no AiTool (ex.: sideEffects: boolean, padrão true por segurança), com a regra valendo só para as tools com efeito. As três de leitura declaram false. Teste: tool de leitura chamada + 503 no passo seguinte → o próximo modelo responde.

Depende da decisão do #390 (a marcação de "tool iniciada" deve seguir o mesmo critério).

Dominant language
JavaScript
Stars
26
Forks
6
Avg merge
2h 53m
Merged PRs (30d)
173

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from murillous/LumaBot

All issues in murillous/LumaBot

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.