Skip to content

feat(core): append model identity to system prompts via plugin - #49129

Merged
rekram1-node merged 5 commits into
v2from
system-prompt-templating
Sep 15, 2026
Merged

rekram1-node merged 5 commits into
v2from
system-prompt-templating

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Every model request now carries a second system part naming the model: You are powered by (/).

Implemented as an internal session-hook plugin (opencode.prompt.identity, alongside the optimize family) rather than prompt templating, so custom agent prompts are covered with no opt-in. It resolves the display name from the catalog with a ref-id fallback, hooks context/compaction/generate/title, and inserts at index 1 so family-prompt overrides of the first part preserve it. No changes to Resolved, the runner, or any shipped prompt text.

Tests: identity unit coverage, plugin registered in the runner/recorded/title setups with 3-part expectations, and a surgical cassette update. Full core suite: 5385 pass with only the 8 pre-existing shell/env failures that also fail on the base.

@rekram1-node
rekram1-node force-pushed the system-prompt-templating branch from 5c1182f to 79a0e1c Compare September 15, 2026 06:40
@rekram1-node rekram1-node changed the title feat(core): template model identity into system prompts feat(core): append model identity to system prompts via plugin Sep 15, 2026
@rekram1-node
rekram1-node force-pushed the system-prompt-templating branch from 79a0e1c to 9317eba Compare September 15, 2026 06:43
@rekram1-node
rekram1-node merged commit d54fc30 into v2 Sep 15, 2026
7 of 8 checks passed
@rekram1-node
rekram1-node deleted the system-prompt-templating branch September 15, 2026 16:46
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.

1 participant