[loop-generated] [bug] Cloud backends receive unformatted LITE prompt with literal {model_name} placeholders #135

Closed
opened 2026-03-15 13:18:01 +00:00 by hermes · 0 comments
Collaborator

Bug

src/timmy/backends.py (line 21) imports SYSTEM_PROMPT directly from prompts.py:

from timmy.prompts import SYSTEM_PROMPT

This has two problems:

1. Unformatted placeholders sent to cloud backends

SYSTEM_PROMPT contains {model_name} and {session_id} placeholders. The backends use it raw without calling .format(), so Grok and Claude receive literal {model_name} in their system prompt.

Lines affected:

  • L131: context = SYSTEM_PROMPT + "\n\n" (AirLLM)
  • L391: messages = [{"role": "system", "content": SYSTEM_PROMPT}] (Grok)
  • L484: system=SYSTEM_PROMPT (Claude)

2. Always uses LITE tier

SYSTEM_PROMPT = SYSTEM_PROMPT_LITE (line 134 of prompts.py). Grok and Claude are highly capable models that should use SYSTEM_PROMPT_FULL, but they get the stripped-down lite prompt.

Fix

Replace from timmy.prompts import SYSTEM_PROMPT with from timmy.prompts import get_system_prompt and call get_system_prompt(tools_enabled=True, session_id="cloud") where the prompt is used. For AirLLM (local, no tools), use get_system_prompt(tools_enabled=False, session_id="airllm").

## Bug `src/timmy/backends.py` (line 21) imports `SYSTEM_PROMPT` directly from `prompts.py`: ```python from timmy.prompts import SYSTEM_PROMPT ``` This has two problems: ### 1. Unformatted placeholders sent to cloud backends `SYSTEM_PROMPT` contains `{model_name}` and `{session_id}` placeholders. The backends use it raw without calling `.format()`, so Grok and Claude receive literal `{model_name}` in their system prompt. Lines affected: - L131: `context = SYSTEM_PROMPT + "\n\n"` (AirLLM) - L391: `messages = [{"role": "system", "content": SYSTEM_PROMPT}]` (Grok) - L484: `system=SYSTEM_PROMPT` (Claude) ### 2. Always uses LITE tier `SYSTEM_PROMPT = SYSTEM_PROMPT_LITE` (line 134 of prompts.py). Grok and Claude are highly capable models that should use `SYSTEM_PROMPT_FULL`, but they get the stripped-down lite prompt. ### Fix Replace `from timmy.prompts import SYSTEM_PROMPT` with `from timmy.prompts import get_system_prompt` and call `get_system_prompt(tools_enabled=True, session_id="cloud")` where the prompt is used. For AirLLM (local, no tools), use `get_system_prompt(tools_enabled=False, session_id="airllm")`.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#135