Add --model flag so agents can self-report their model - #8
Merged
Conversation
agent_llm_model was effectively always absent: no agent framework exports its active model to subshells, so env detection rarely finds one. Let callers self-report, and address AI agents directly in the help text — the one place they reliably read.
Merged
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.
Summary
agent_llm_modelattribution was effectively always absent: agent frameworks don't export the active model to subshells, so env detection (ANTHROPIC_MODELetc.) rarely finds anything. The model name lives only in the agent's own context — self-reporting is the only reliable channel.--model <name>flag, sent asagent_llm_model; overrides env detection, still suppressed by--no-agent-metadata.--helpcloses with a note addressed to AI agents suggesting--goaland--model, with a copyable example — agents read help before running unfamiliar CLIs, so this is the conversion point.Test plan
--modeloverride beats env detection,--no-agent-metadatastill suppresses everything🤖 Generated with Claude Code