Repository navigation
Add the Insights page: usage chat and takeaways on hototel's own Modal model - #49
Closed
eddietejeda wants to merge 1 commit into
Closed
eddietejeda wants to merge 1 commit into
eddietejeda wants to merge 1 commit into
Conversation
eddietejeda
force-pushed
the
insights-page
branch
2 times, most recently
from
October 17, 2026 02:37
de0a5fd to
3f3f503
Compare
…, on hototel's own model A new /insights page lets a signed-in member ask questions about how the team uses Claude Code, Codex and OpenCode, and shows a generated set of takeaways (good work, valuable work, redundant work) for the last 30 days. A LangChain agent answers by running SQL through hotdata-langchain tools scoped at build time to the viewer's org database, so it can only read that organization's usage. Every answer lists the queries it ran. The model is hototel's own deployment on Modal (modal/hototel_llm.py): Qwen3-30B-A3B-Instruct-2507 behind vLLM's OpenAI-compatible API on one H100, scaling to zero when idle, so usage rows stay inside the company's accounts. The Anthropic API remains an alternative via ANTHROPIC_API_KEY. Routes: GET /insights, /api/insights/status, /api/insights/takeaways and POST /api/insights/chat, cookie sessions only (read tokens are refused), behind the verify gate, rate limited per IP, at most four agent runs at once per process. With no model configured the page says so and the API answers 503.
eddietejeda
force-pushed
the
insights-page
branch
from
October 17, 2026 02:40
3f3f503 to
14c7204
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #47 (it needs the verify gate from that branch).
A new
/insightspage: members ask questions about the team's AI coding usage and see generated takeaways (good, valuable, redundant work) for the last 30 days. A LangChain agent runs SQL through hotdata-langchain tools fixed to the viewer's org database, so it reads only that org. Every answer lists its queries.The model is hototel's own deployment on Modal (
modal/hototel_llm.py, Qwen3-30B-A3B-Instruct-2507 on vLLM, one H100, scales to zero). Anthropic API stays as an alternative.Operator setup after merge (App Runner env vars, otherwise the page shows "Insights are off"):
Routes:
GET /insights,/api/insights/status,/api/insights/takeaways,POST /api/insights/chat. Cookie sessions only, read tokens refused, rate limited, max four concurrent agent runs per process. Tests:server/tests/test_insights.py; all seven suites pass.