Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
fa454b1b
Commit
fa454b1b
authored
Jan 29, 2026
by
cyhhao
Browse files
fix: align Claude Code system banner with opencode latest
parent
8375094c
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/gateway_service.go
View file @
fa454b1b
...
@@ -39,9 +39,10 @@ const (
...
@@ -39,9 +39,10 @@ const (
claudeAPICountTokensURL
=
"https://api.anthropic.com/v1/messages/count_tokens?beta=true"
claudeAPICountTokensURL
=
"https://api.anthropic.com/v1/messages/count_tokens?beta=true"
stickySessionTTL
=
time
.
Hour
// 粘性会话TTL
stickySessionTTL
=
time
.
Hour
// 粘性会话TTL
defaultMaxLineSize
=
40
*
1024
*
1024
defaultMaxLineSize
=
40
*
1024
*
1024
// Keep a trailing blank line so that when upstream concatenates system strings,
// Canonical Claude Code banner. Keep it EXACT (no trailing whitespace/newlines)
// the injected Claude Code banner doesn't run into the next system instruction.
// to match real Claude CLI traffic as closely as possible. When we need a visual
claudeCodeSystemPrompt
=
"You are Claude Code, Anthropic's official CLI for Claude.
\n\n
"
// separator between system blocks, we add "\n\n" at concatenation time.
claudeCodeSystemPrompt
=
"You are Claude Code, Anthropic's official CLI for Claude."
maxCacheControlBlocks
=
4
// Anthropic API 允许的最大 cache_control 块数量
maxCacheControlBlocks
=
4
// Anthropic API 允许的最大 cache_control 块数量
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment