Skip to content

feat: inject dynamic model identity into system prompt - #570

Open
fsistemas wants to merge 1 commit into
huggingface:mainfrom
fsistemas:feature/FAI-299
Open

feat: inject dynamic model identity into system prompt#570
fsistemas wants to merge 1 commit into
huggingface:mainfrom
fsistemas:feature/FAI-299

Conversation

@fsistemas

@fsistemas fsistemas commented Aug 9, 2026

Copy link
Copy Markdown

Summary

Add provider_name, model, and reasoning fields to BuildSystemPromptOptions so Tau's system prompt includes the agent's actual runtime identity.

Changes

  • system_prompt.py: Added three new optional fields to BuildSystemPromptOptions (provider_name, model, reasoning). When any is set, build_system_prompt() injects a 'You are running as: provider: X, model: Y, reasoning: Z.' line into the prompt.
  • session.py: Both BuildSystemPromptOptions call sites (initial load and reload path) now pass identity fields. reasoning_effort_for_level maps Tau's thinking level to standard reasoning effort vocabulary.
  • tests: Added 3 tests for full, partial, and no identity injection.

Why

Previously, agents couldn't reliably know their own provider/model/reasoning without parsing session metadata. The old approach of ~/.tau/APPEND_SYSTEM.md with static text couldn't use template variables. This code-level fix injects the identity at build time so every agent session starts with this information baked into the system prompt.

Fixes: #569

Add provider_name, model, and reasoning fields to BuildSystemPromptOptions
so Tau's system prompt includes the agent's actual runtime identity.

The system prompt now contains 'You are running as: provider: X, model: Y,
reasoning: Z.' when identity fields are set, enabling agents to report
their identity without parsing session metadata.

Both call sites (session load and reload) pass identity through.
reasoning_effort_for_level maps Tau's thinking level (off/minimal/...)
to the standard reasoning effort vocabulary (none/minimal/...).

Fixes: FAI-299
@fsistemas
fsistemas requested a review from alejandro-ao as a code owner August 9, 2026 18:42
@rian-dolphin

Copy link
Copy Markdown
Contributor

Tau generally follows the lead of Pi and Pi explicitly does not include these details in the system prompt. Pi's system prompt contains no model, provider, reasoning level, date, or env section at all, following the minimalist goal of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inject model/provider identity into system prompt

2 participants