Skip to content

Github Copliot provider allows only 128k token conversations. #2317

Closed
anomalyco/models.dev
#199

Description

@Steinvorth

I have noticed that when using github copilot as my provider i get this error for prompt longer that 128k tokens. this seems weird, since i am using gemini 2.5 pro as my model, but conversations cannot be more than a few messages long because token limit is reached. is there a way to fix that?

Image

Activity

  1. github-actions commented on Aug 29, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Aug 29, 2025

    @rekram1-node
    Contributor

    I think we need to update models.dev to reflect this

  3. rekram1-node commented on Aug 29, 2025

    @rekram1-node
    Contributor

    Made issue on models.dev to track: anomalyco/models.dev#172

  4. astrolox commented on Aug 30, 2025

    @astrolox

    I have encountered the same problem.

    I don't see any options for configuring manually context limits, which surprised me. Does this exist?

  5. rekram1-node commented on Aug 30, 2025

    @rekram1-node
    Contributor

    @astrolox there are options for this actually:

    "provider": {
        "github-copilot": {
          "models": {
            "gemini-2.5-pro": {
              "limit": {
                "context": 128000,
                "output": 65536
              }
            }
          }
        }
      }
    

    We will need to fix models.dev to accurately portray the limits but you can do this^ as a workaround, annoyingly github copilot doesn't exactly outline the limits for each model

  6. Steinvorth commented on Sep 1, 2025

    @Steinvorth
    Author

    Thanks for the help, and for the fast response I will implement this immediately! 💪

  7. art-shen commented on Sep 10, 2025

    @art-shen

    Makes GitHub Copilot models effectively unusable 😿

  8. rekram1-node commented on Sep 10, 2025

    @rekram1-node
    Contributor

    @amal I made an issue on models.dev to update the models. if it doesn't have any open prs I will try to jump on that next sorry about delay on this I mentioned to team a few weeks ago

  9. rekram1-node commented on Sep 11, 2025

    @rekram1-node
    Contributor

    I made a PR to models.dev and pinged team to review hopefully it gets shipped soon

  10. rekram1-node commented on Sep 11, 2025

    @rekram1-node
    Contributor

    Try restarting opencode or running:

    rm ~/.cache/opencode/models.json
    

    and it should be fixed

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

Metadata

Metadata

Assignees

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