Skip to content

[deep-report] Extract an options struct for computeModelEffectiveTokensWithWeights (9 params, limit 8) #36947

@github-actions

Description

@github-actions

Description

The daily custom-linter scan flagged a single Too Many Parameters finding: computeModelEffectiveTokensWithWeights at pkg/cli/effective_tokens.go:239 takes 9 parameters (model, provider, inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens, reasoningTokens, multipliers, w) against the limit of 8.

Acceptance Criteria

  • Group the token-count fields (input/output/cacheRead/cacheWrite/reasoning) into a small struct (e.g. TokenUsage) and pass that, dropping the function under the 8-param limit.
  • Update all callers.
  • make golint-custom reports no too-many-parameters finding for this function; make build and existing tests pass.

Expected Impact

Clears the only structural lint finding outside the function-length backlog; improves call-site readability.

Suggested Agent

LintMonster follow-up or any Go refactoring agent.

Estimated Effort

Fast (< 30 min)

Data Source

DeepReport 2026-06-04; source report #36813.

Generated by 🔬 DeepReport - Intelligence Gathering Agent · opus48 17.8M ·

  • expires on Jun 6, 2026, 4:01 PM UTC

Metadata

Metadata

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