Skip to content

Refine response language policy and reduce prompt costs - #2792

Merged
esokullu merged 11 commits into
webbrain-one:mainfrom
esokullu:main
Aug 14, 2026
Merged

Refine response language policy and reduce prompt costs#2792
esokullu merged 11 commits into
webbrain-one:mainfrom
esokullu:main

Conversation

@esokullu

Copy link
Copy Markdown
Collaborator

No description provided.

esokullu and others added 11 commits August 14, 2026 06:25
Fix response language policy for agent completions
The policy block from #257 was injected on every turn, in the system prompt
and again in the done tool description, with no prompt-tier gate. On the
compact tier that was roughly 10% of a 1,500-token base prompt, paid twice,
to say "answer in English" in the common case.

Ordinary policies now render as one line of about 40 tokens. Translation
targets, multilingual deliverables, approved-plan overrides, and synthetic
Continue resumptions keep the full wording, since those are the cases the
original fix was about. Compact tier uses the short rendering wherever it can
still carry the deliverable language.

The done schema no longer repeats the instruction on normal turns. Forced
terminal delivery keeps both copies: that turn has one shot and no planner
context, which is what #257 fixed.

Also stop discarding an explicitly empty deliverable_locales list. A planner
answer of "no fixed target, source may be translated" is coherent and is now
kept; a list whose entries are all invalid still fails closed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The short form ended in an unconditional "never translate ... product names,
or personal names". The full form allows it when the user explicitly asks, so
a compact-tier model reading the short form could leave a requested product
name or transliteration untouched.

Costs about 17 tokens: ordinary policies go from 43 to 60, the planner-bypass
fallback from 58 to 75. Still well under the 150 the full block charges.

Reported by codex on #258.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Trim the response-language policy prompt cost
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

@esokullu is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu
esokullu merged commit 24614c1 into webbrain-one:main Aug 14, 2026
1 of 2 checks passed
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.

2 participants