Skip to content

docs: github.md examples use num_code_suggestions, but the real config key is num_code_suggestions_per_chunk - documented overrides are silently ignored #3331

Description

@utsab345

Summary

docs/docs/installation/github.md (live at https://docs.pr-agent.ai/installation/github/) instructs users to set PR_CODE_SUGGESTIONS.NUM_CODE_SUGGESTIONS, pr_code_suggestions.num_code_suggestions, or num_code_suggestions = 6 in three different examples. The tool only reads num_code_suggestions_per_chunk, so every documented override is silently ignored.

Evidence

Docs (three locations):

  • github.md:52 - PR_CODE_SUGGESTIONS.NUM_CODE_SUGGESTIONS: 6 # Increase number of code suggestions (GitHub Action env)
  • github.md:383 - pr_code_suggestions.num_code_suggestions: "8" (a workflow example)
  • github.md:462 - num_code_suggestions = 6 (a .pr_agent.toml example)

Code:

  • pr_agent/settings/configuration.toml:218 defines num_code_suggestions_per_chunk=3
  • pr_agent/tools/pr_code_suggestions.py:149 reads get_settings().pr_code_suggestions.num_code_suggestions_per_chunk

There is no num_code_suggestions config key (the only other hit is a comment string in pr_agent/algo/utils.py:919). Note that improve.md documents the key correctly as num_code_suggestions_per_chunk (improve.md:62, :312, :394), and configuration_reference.md:255 lists the right key too.

Impact

Users tuning the number of code suggestions via the GitHub integration docs see no effect and no warning.

Expected

Update the three examples in github.md to use num_code_suggestions_per_chunk (e.g. PR_CODE_SUGGESTIONS.NUM_CODE_SUGGESTIONS_PER_CHUNK).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions