Skip to content

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

Closed as not planned

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

Activity

  1. added
    cookie
    on Jun 4, 2026
  2. github-actions commented on Jun 4, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · haiku45 26K · ◷

  3. github-actions commented on Jun 6, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-06-06T16:01:42.188Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

automationcookieimprovementquick-win

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions