Skip to content

bug: chat response latency reported by users #87

Description

@JeffOtano

Context

Multiple users from the r/tonalgym launch thread reported the chat feeling slow/laggy. One user specifically called it out:

The only issue I'm having is the chat seems to be lagging.

What to investigate

  • Gemini API response times (are we hitting rate limits or cold starts on gemini-3-flash-preview?)
  • Context window size — the training snapshot injected via contextHandler could be large for users with extensive history, slowing time-to-first-token
  • Tool call chains — the coach has 31 tools and maxSteps: 25. Complex questions may trigger multiple sequential tool calls before producing a visible response
  • Streaming behavior — verify the frontend is streaming tokens as they arrive rather than waiting for the full response

Notes

  • This may partly be perception (AI coach responses involve tool calls that take time before text starts flowing) vs an actual performance issue.
  • Worth checking if latency correlates with users who have long Tonal histories (larger training snapshots).
  • Related: feat: multi-provider support via OpenAI-compatible API #85 (multi-provider support) — some users are requesting Claude/other providers, partly motivated by perceived Gemini latency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: productUser-facing product backlog outside the AI infrastructure epicbugSomething is brokenperformanceCost or latency improvementpriority: highHigh priority work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions