odysseus-dev/odysseus · error · HTTPException
Daily message limit reached ({cap}). Try again in 24 hours.
Error message
Daily message limit reached ({cap}). Try again in 24 hours. What it means
A usage-quota gate that counts the user's own user-role chat messages across all their sessions in the trailing 24 UTC hours and rejects with HTTP 429 when the count reaches the max_messages_per_day cap. It fires before any LLM work so no tokens are spent over quota.
Source
Thrown at routes/chat_helpers.py:239
if cap <= 0:
return
from datetime import datetime as _dt, timedelta as _td
from core.database import Session as _DbSess, ChatMessage as _Cm
db = SessionLocal()
try:
count = (
db.query(_Cm)
.join(_DbSess, _Cm.session_id == _DbSess.id)
.filter(_DbSess.owner == user,
_Cm.role == "user",
_Cm.timestamp >= _dt.utcnow() - _td(days=1))
.count()
)
finally:
db.close()
if count >= cap:
raise HTTPException(429, f"Daily message limit reached ({cap}). Try again in 24 hours.")
def needs_auto_name(name: str) -> bool:
"""Check if a session still has its default/placeholder name."""
if not name:
return True
if name.startswith("Chat:") or name == "Chat":
return True
# Default frontend name: "modelname HH:MM:SS AM/PM"
if re.match(r"^.+ \d{1,2}:\d{2}:\d{2}(\s*(AM|PM))?$", name, re.IGNORECASE):
return True
return False
async def auto_name_session(session_manager, sess):
"""Generate a short title for a session from its first user message."""
try:
from src.llm_core import llm_call_asyncView on GitHub (pinned to f9235ebbf1)
Solutions
- Wait until messages age out of the 24-hour UTC window (quota is rolling, not calendar-day)
- Ask an admin to raise or remove max_messages_per_day for the user
- Audit for scripted or duplicated sends inflating the count
Defensive patterns
Strategy: validation
Validate before calling
// Before sending, check remaining quota if the API exposes it; otherwise track sends client-side
if (messagesSentToday >= knownCap) { showQuotaExceededUI(retryAt: nextUtcRollout); return; } Try / catch
try { await sendChat(...); } catch (e) {
if (e.status === 429 && /Daily message limit/.test(e.message)) { disableComposeUntilWindowRolls(); }
} Prevention
- Show a remaining-messages counter when a cap is configured
- Debounce/deduplicate send actions so double-clicks don't burn quota
- Respect Retry-After-style backoff instead of hammering the endpoint
When it happens
Trigger: User at or over their daily cap sends any chat message. Each user-role row in ChatMessage joined to a session owned by the user within the last day counts toward cap.
Common situations: Free-tier user with a low cap hitting it mid-conversation; automated scripts posting messages that burn the quota; cap set very low (e.g. 10) by an admin for testing and never raised.
Related errors
- d.detail || 'Failed'
- Your account is not allowed to use model '{sess.model}'.
- Session '{session}' not found
- Selected model endpoint was removed. Pick another model in S
- No model selected for this chat. Open the model picker and c
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/71cabeb570d7f153.
Report an issue: GitHub.