Skip to content

feat: add show_model_in_prompt config to hide model from prompt#3340

Open
fauzan171 wants to merge 1 commit into
tailcallhq:mainfrom
fauzan171:feat/show-model-in-prompt-config
Open

feat: add show_model_in_prompt config to hide model from prompt#3340
fauzan171 wants to merge 1 commit into
tailcallhq:mainfrom
fauzan171:feat/show-model-in-prompt-config

Conversation

@fauzan171
Copy link
Copy Markdown

Summary

Add a show_model_in_prompt configuration option that allows users to hide the model name and reasoning effort from the shell prompt (both ZSH rprompt and interactive REPL prompt).

Context

Users may not want others to see which AI model they are using, especially in shared screen/pair programming environments. Currently, the model name is always displayed in the right-side prompt and cannot be disabled.

Closes #3317

Changes

  • Added show_model_in_prompt boolean config field to ForgeConfig (defaults to true)
  • Updated ZshRPrompt to conditionally render model and reasoning effort segments based on config
  • Updated ForgePrompt (interactive REPL prompt) to conditionally render model and reasoning effort segments
  • Added default value (true) in embedded .forge.toml defaults
  • Updated JSON schema (forge.schema.json) to include the new field

Key Implementation Details

The show_model flag is threaded from ForgeConfig through to both prompt renderers:

  1. ZSH rprompt (ZshRPrompt): Receives the flag via from_config() constructor, wraps both model and reasoning effort rendering in a conditional block
  2. REPL prompt (ForgePrompt): Receives the flag via the show_model setter generated by derive_setters, wraps both model and reasoning effort rendering in a conditional block

When show_model_in_prompt = false, both the model name AND reasoning effort label are hidden since reasoning effort is semantically tied to the model.

Use Cases

# In forge.toml - hide model from prompt
show_model_in_prompt = false
# Via environment variable
FORGE_SHOW_MODEL_IN_PROMPT=false forge

This is useful for:

  • Screen sharing / presentations where you don't want to reveal your model choice
  • Pair programming sessions
  • Screenshots/video recordings

Testing

# Run all related tests
cargo test -p forge_main -- rprompt
cargo test -p forge_main -- prompt
cargo test -p forge_config

# Verify config parsing
cargo test -p forge_config -- show_model

All 44 prompt/rprompt tests pass including 5 new tests:

  • test_rprompt_hide_model - verifies model and effort hidden when disabled (active state)
  • test_rprompt_hide_model_init_state - verifies model hidden when disabled (inactive state)
  • test_rprompt_show_model_default_true - verifies model visible by default
  • test_render_prompt_right_hide_model - verifies REPL prompt hides model when disabled
  • test_render_prompt_right_show_model_default_true - verifies REPL prompt shows model by default

Links

Add a new configuration option  that allows users
to hide the model name from the shell prompt (both ZSH rprompt and
interactive REPL prompt). This addresses privacy concerns where users
may not want others to see which AI model they are using.

When set to , both the model name and reasoning effort segments
are hidden from the status line. Defaults to  to preserve
existing behavior.

Usage in forge.toml:
  show_model_in_prompt = false

Or via environment variable:
  FORGE_SHOW_MODEL_IN_PROMPT=false

Closes tailcallhq#3317
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: allow customizable command line message. I want to be able to remove the model name to be displayed on the forge line

2 participants