Feature: Model-aware attribution — reflect actual model backend in system prompt and commit co-author
Problem
When using Claude Code with a non-Claude model backend (e.g., glm-5.1 via Ollama), the system prompt and commit co-author line still hardcode Anthropic/Claude branding:
- System prompt:
"You are Claude Code, Anthropic's official CLI for Claude" - Co-author line:
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> - Model family references:
"The most recent Claude model family is Claude 4.X..."
The environment correctly reports You are powered by the model glm-5.1:cloud, but every other identity claim in the system prompt assumes Claude. This causes:
- Incorrect attribution in git commits, documents, and decision logs — co-author says "Claude Opus 4.7" when the model is something else entirely
- Confusing self-identification — the assistant introduces itself as "Claude" when it is running a different model
- Misleading model family references — the system prompt describes Claude model IDs and capabilities that do not apply to the configured backend
Proposed Solution
Make the system prompt and co-author template model-aware:
- Co-author line: Use the actual model identifier instead of hardcoded
"Claude Opus 4.7". E.g.,Co-Authored-By: glm-5.1 <noreply@glm.dev>or a genericCo-Authored-By: Claude Code <noreply@anthropic.com>that attributes the tool, not the model.
- System prompt identity: When the model is not a Claude model, adjust the self-identification to distinguish the CLI tool from the model backend. E.g.,
"You are Claude Code, running with the glm-5.1 model backend."
- Model family references: Only inject Claude model family info (Opus, Sonnet, Haiku IDs, fast mode details) when the configured model is actually a Claude model. Skip or replace with relevant info for other backends.
Context
Claude Code supports custom model providers (Ollama, OpenAI-compatible endpoints, etc.). The CLI correctly detects and reports the model name in the environment block, but the rest of the system prompt and templates have not been updated to reflect this flexibility. This creates a credibility gap — the tool claims to be something it is not.
Impact
- Users running non-Claude models get incorrect commit attribution
- Document authorship (ADRs, decision logs) inherits wrong model credit
- The mismatch is confusing when inspecting system prompts or debugging behavior
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗