Skip to content

Skip magic words system prompt injection for Haiku models#10

Open
chknd1nner wants to merge 1 commit intohorselock:mainfrom
chknd1nner:fix/haiku-system-prompt
Open

Skip magic words system prompt injection for Haiku models#10
chknd1nner wants to merge 1 commit intohorselock:mainfrom
chknd1nner:fix/haiku-system-prompt

Conversation

@chknd1nner
Copy link
Copy Markdown
Contributor

Problem

Haiku models don't actually require the "You are Claude Code..." system prompt to be authenticated by the API endpoint so it's just unnecessarily confusing the model.

Solution

Detect Haiku models (case-insensitive check for "haiku" in model name) and skip the system prompt injection for those models only.

Haiku models fail when the 'You are Claude Code' system prompt is prepended.
This change detects Haiku models (case-insensitive check for 'haiku' in model name)
and skips the system prompt injection for those models only.

Tested with claude-3-haiku and claude-3-5-haiku variants.
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