Skip to content

fix: dynamically patch model identity in injected system prompt#1

Open
Maydaytyh wants to merge 1 commit intoDarkstarrd-dev:mainfrom
Maydaytyh:fix/dynamic-model-identity
Open

fix: dynamically patch model identity in injected system prompt#1
Maydaytyh wants to merge 1 commit intoDarkstarrd-dev:mainfrom
Maydaytyh:fix/dynamic-model-identity

Conversation

@Maydaytyh
Copy link

Summary

  • The bridge injects a pre-captured system prompt from claude_code_system.json which hardcodes "You are powered by the model named Sonnet 4.5".
  • This causes all models (including Opus 4.6, Sonnet 4.6, etc.) to respond as Sonnet 4.5, regardless of which model is actually requested.
  • Now the model identity line in the system prompt is dynamically replaced using regex to match the actual requested model name.

Test plan

  • Start the bridge, send a request with model: "claude-opus-4-6", verify the response no longer claims to be Sonnet 4.5
  • Send a request with model: "claude-sonnet-4-6", verify the response identifies as Sonnet 4.6
  • Enable debug: true in config, confirm log shows Injected Claude Code system prompt (model identity: claude-opus-4-6)

The bridge was injecting a pre-captured system prompt from
claude_code_system.json that hardcoded "You are powered by Sonnet 4.5",
causing all models to respond as Sonnet 4.5 regardless of the actual
model requested. Now the model identity line in the system prompt is
dynamically replaced to match the requested model.
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