Skip to content

fix(ai): analyzer drops configured max_tokens and temperature #120

Description

@btwshivam

DefaultAnalyzer.Analyze builds the CompletionRequest without MaxTokens or Temperature (internal/ai/analyzer.go:68), so the per-request override path that provider_test.go exercises as a feature is dead through the only real caller.

it happens to work today because each provider falls back to its own default (1024 tokens, temp 0.2) and buildAnalyzer seeds those defaults from ProviderConfig. but the documented CompletionRequest.MaxTokens / Temperature fields never carry through in production, and anyone constructing a provider with a zero-value config and relying on per-request values gets them silently ignored.

set MaxTokens and Temperature on the request from the analyzer's config so the request-level values are actually wired, and the precedence is consistent.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingclaimedSomeone is actively working on this (auto-released after 10d inactivity)good first issueGood for newcomers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions