Skip to content

Bug: Custom model option fails with invalid API parameters when used with other flags #2

@taehwanno

Description

@taehwanno

Description

When using the --model flag with a custom model (e.g., xai/grok-3-mini) along with other flags like --days, the API request fails with a 400 Bad Request error indicating invalid parameters (top_p=0).

Steps to Reproduce

  1. Run gh standup --days 3 --model xai/grok-3-mini
  2. The command processes GitHub activity data successfully
  3. API call fails during report generation with parameter validation error

Expected Behavior

The standup report should be generated successfully when using custom models with other command flags, similar to how it works with the default model.

Actual Behavior

The command fails with the following error:

Full command output:

$ gh standup --days 3 --model xai/grok-3-mini
  Connecting to GitHub API... Done
Getting authenticated GitHub user... ✅ Found user: taehwanno
Analyzing GitHub activity for taehwanno (2025-07-25 to 2025-07-28)
Collecting GitHub activity data...
  🔍 Searching for commits... ✅ Found 14 commits
  🔍 Searching for pull requests... ✅ Found 0 pull requests
  🔍 Searching for issues... ✅ Found 0 issues
  🔍 Searching for code reviews... ✅ Found 0 reviews
Found 14 activities
   14 commits, 0 pull requests, 0 issues, 0 reviews
  Checking GitHub token... Done
Generating standup report using xai/grok-3-mini...
  Formatting activity data for AI... Done
  Loading prompt configuration... Done
  Calling GitHub Models API (xai/grok-3-mini)... Failed

Error: failed to generate standup report: API request failed with status 400: {"error":{"code":"Bad Request","message":"{code:Client specified an invalid argument,error:top_p must be positive but top_p = 0}","status":400}}

Environment

  • gh standup extension version: v1
  • gh CLI version: 2.76.1 (2025-07-23)
  • Operating System: macOS Darwin 24.5.0

Additional Context

  • The default model (openai/gpt-4o) works correctly with the same flags (gh standup --days 3)
  • The issue appears when combining --model with other flags like --days

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions