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:
@@ -209,11 +209,12 @@ func (b *Builder) Build() (*probodconfig.FullConfig, error) {
|
||||
TrackerMapping: probodconfig.LLMAgentConfig{
|
||||
Provider: b.getEnvOrDefault("AGENT_TRACKER_MAPPING_PROVIDER", ""),
|
||||
ModelName: b.getEnvOrDefault("AGENT_TRACKER_MAPPING_MODEL_NAME", ""),
|
||||
// The tracker agents emit tiny structured JSON, so
|
||||
// they default to a smaller token budget than the
|
||||
// shared default rather than inheriting it.
|
||||
// The tracker agents emit tiny structured JSON, but
|
||||
// the budget must leave headroom for reasoning
|
||||
// models whose reasoning tokens count against
|
||||
// max_tokens; too small a budget truncates the JSON.
|
||||
Temperature: b.getEnvFloatPtr("AGENT_TRACKER_MAPPING_TEMPERATURE"),
|
||||
MaxTokens: new(b.getEnvIntOrDefault("AGENT_TRACKER_MAPPING_MAX_TOKENS", 1024)),
|
||||
MaxTokens: new(b.getEnvIntOrDefault("AGENT_TRACKER_MAPPING_MAX_TOKENS", 4096)),
|
||||
},
|
||||
Tools: probodconfig.AgentToolsConfig{
|
||||
FirecrawlAPIKey: b.getEnv("FIRECRAWL_API_KEY"),
|
||||
|
||||
@@ -218,7 +218,7 @@ func TestBuilder_Build_Defaults(t *testing.T) {
|
||||
assert.Empty(t, cfg.Probod.Agents.TrackerMapping.Provider)
|
||||
assert.Empty(t, cfg.Probod.Agents.TrackerMapping.ModelName)
|
||||
assert.Nil(t, cfg.Probod.Agents.TrackerMapping.Temperature)
|
||||
assert.Equal(t, new(1024), cfg.Probod.Agents.TrackerMapping.MaxTokens)
|
||||
assert.Equal(t, new(4096), cfg.Probod.Agents.TrackerMapping.MaxTokens)
|
||||
|
||||
// Tracker worker tuning — defaults
|
||||
assert.Equal(t, 10, cfg.Probod.TrackerMappingWorker.Interval)
|
||||
|
||||
Reference in New Issue
Block a user