Raise default agent token budget for reasoning models
The tracker mapping, common-pattern enrichment, and third-party disambiguation agents default to a small max-tokens budget on the premise that their final output is tiny structured JSON. On reasoning models such as the GPT-5 family, reasoning tokens count against max_tokens, so a small budget is consumed by reasoning and the JSON is truncated, surfacing as "unexpected end of JSON input". Raise the defaults to 4096 (1024 -> 4096 for tracker mapping, 512 -> 4096 for disambiguation) to leave headroom for the reasoning phase. Update the bootstrap builder default, its test, and the production values example to match. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
12
pkg/thirdparty/disambiguation_agent.go
vendored
12
pkg/thirdparty/disambiguation_agent.go
vendored
@@ -44,10 +44,14 @@ const (
|
||||
// provider, not a real budget.
|
||||
defaultDisambiguationTimeout = 45 * time.Second
|
||||
|
||||
// defaultDisambiguationMaxTokens caps the agent's structured
|
||||
// output when the config carries no max-tokens budget. The output
|
||||
// is a single id plus a one-sentence rationale.
|
||||
defaultDisambiguationMaxTokens = 512
|
||||
// defaultDisambiguationMaxTokens caps the agent's output when the
|
||||
// config carries no max-tokens budget. The final output is tiny (a
|
||||
// single id plus a one-sentence rationale), but the budget must
|
||||
// leave ample headroom for reasoning models (e.g. the GPT-5
|
||||
// family): their reasoning tokens count against max_tokens, so too
|
||||
// small a budget gets consumed by reasoning and truncates the JSON,
|
||||
// surfacing as "unexpected end of JSON input".
|
||||
defaultDisambiguationMaxTokens = 4096
|
||||
)
|
||||
|
||||
// DisambiguationConfig configures the third-party disambiguation
|
||||
|
||||
Reference in New Issue
Block a user