[FEATURE]: Add a variable {CURRENT_MODEL} for commands #7355

Open
opened 2026-02-16 18:06:56 -05:00 by yindo · 2 comments
Owner

Originally created by @rygel on GitHub (Jan 23, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would like to write a command which commits the changes to git and also adds the name of the model to the commit message. I would like to know which commit has been authored by which model, as I am experimenting a lot with different models. Therefore a variable {CURRENT_MODEL} is very useful for a command.

I can currently workaround by using command parameters, but then I need to check and remember the name of the model and write it properly.

Originally created by @rygel on GitHub (Jan 23, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I would like to write a command which commits the changes to git and also adds the name of the model to the commit message. I would like to know which commit has been authored by which model, as I am experimenting a lot with different models. Therefore a variable `{CURRENT_MODEL}` is very useful for a command. I can currently workaround by using command parameters, but then I need to check and remember the name of the model and write it properly.
yindo added the discussion label 2026-02-16 18:06:56 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 23, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5054: [FEATURE]: {env:MY_VAR} support in agent yaml - requests environment variable expansion for controlling model selection in agent/command definitions
  • #5082: [FEATURE]: allow shell commands in the frontmatter - requests ability to execute shell commands for dynamic configuration
  • #9065: [FEATURE]: add model identity info to system prompt - requests model identity information to be accessible
  • #6651: [FEATURE]: Dynamic model selection for subagents via Task tool - comprehensive feature request for dynamic model selection with model tier mappings
  • #8278: [FEATURE]: Tool that lets the model switch models - requests ability to control model selection dynamically

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 23, 2026): This issue might be a duplicate of existing issues. Please check: - #5054: [FEATURE]: {env:MY_VAR} support in agent yaml - requests environment variable expansion for controlling model selection in agent/command definitions - #5082: [FEATURE]: allow shell commands in the frontmatter - requests ability to execute shell commands for dynamic configuration - #9065: [FEATURE]: add model identity info to system prompt - requests model identity information to be accessible - #6651: [FEATURE]: Dynamic model selection for subagents via Task tool - comprehensive feature request for dynamic model selection with model tier mappings - #8278: [FEATURE]: Tool that lets the model switch models - requests ability to control model selection dynamically Feel free to ignore if none of these address your specific case.
Author
Owner

@bdwelle commented on GitHub (Jan 24, 2026):

I just submitted PR 10451 - create and expose model-id environment variables for bash from CLI that would provide a solution for this feature request.

@bdwelle commented on GitHub (Jan 24, 2026): I just submitted [PR 10451 - create and expose model-id environment variables for bash from CLI](https://github.com/anomalyco/opencode/pull/10451) that would provide a solution for this feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7355