Skip to content

Copilot Commit Message - Custom provider with Bearer token doesn't work #291

Closed

Description

@irl231

AI Policy Acknowledgement

  • I have read and understood the AI policy.

The problem

Using custom provider

Image

But i get error
Image

my bearer toke works fine tho.

Image

Release version

Version 3.6.7.1 (arm64)

Operating system and distro

Tahoe 26.7 (25G227)

Steps to reproduce the behavior

  1. Add custom provider (make sure the api url and token is correct)
  2. Generate commit

Specific to Desktop Plus?

No response

Log files

No response

Screenshots

No response

Additional context

No response

Activity

  1. added theissue type on Oct 15, 2026
  2. pol-rivero commented on Oct 15, 2026

    @pol-rivero
    Member

    Please check if the error also occurs when using the official GitHub Desktop app. That will help me when trying to isolate the error.

  3. pol-rivero commented on Oct 15, 2026

    @pol-rivero
    Member

    I've done a couple of tests using openrouter.ai and it seems to be working correctly on my end

  4. irl231 commented on Oct 15, 2026

    @irl231
    Author
    Image
    Error: Authentication failed with provider at https://llmr****.*******.com/v1 (HTTP 403).
      Check your COPILOT_PROVIDER_API_KEY or COPILOT_PROVIDER_BEARER_TOKEN.
        at /webpack:/app/src/lib/stores/copilot-store.ts:977:30
        at Jy._dispatchEvent (/webpack:/app/node_modules/@github/copilot-sdk/dist/session.js:579:11)
        at bv.handleSessionEventNotification (/webpack:/app/node_modules/@github/copilot-sdk/dist/client.js:2274:15)
        at /webpack:/app/node_modules/@github/copilot-sdk/dist/client.js:2213:12
        at /webpack:/app/node_modules/vscode-jsonrpc/lib/common/connection.js:640:25
        at se (/webpack:/app/node_modules/vscode-jsonrpc/lib/common/connection.js:342:13)
        at /webpack:/app/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17
        at Immediate._onImmediate (/webpack:/app/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)
        at processImmediate (node:internal/timers:504:21)
    2026-10-15T18:29:29.786Z - warn: [ui] CopilotStore: Failed to generate commit message
    Error: Authentication failed with provider at https://llmr****.*******.com/v1 (HTTP 403).
      Check your COPILOT_PROVIDER_API_KEY or COPILOT_PROVIDER_BEARER_TOKEN.
  5. pol-rivero commented on Oct 15, 2026

    @pol-rivero
    Member

    I've copied the token and deleted your message just in case. I'll let you know once you can rotate it.

  6. deleted a comment from irl231 on Oct 15, 2026
  7. pol-rivero commented on Oct 15, 2026

    @pol-rivero
    Member

    By the way, while I'm looking into this, could you try downloading the official GitHub Desktop app and checking if the error also occurs there?

  8. irl231 commented on Oct 15, 2026

    @irl231
    Author

    I've used the latest version of Official Github Desktop app on the last message with image and error message.

    Image
  9. pol-rivero commented on Oct 15, 2026

    @pol-rivero
    Member

    Ah I missed the "GitHub Desktop" header, my bad.
    I've also found the cause of the error, it seems that auto is a special value used internally in the app, so using that value was causing the wrong values to be sent to your router.
    Is this auto name a convention / default value set by your router? Could you try using a different name? I'll fix the underlying bug anyway, but this will probably unblock you now.

  10. pol-rivero commented on Oct 15, 2026

    @pol-rivero
    Member

    You can also rotate the token

  11. irl231 commented on Oct 15, 2026

    @irl231
    Author

    the auto name is the model default name,.

  12. pol-rivero commented on Oct 15, 2026

    @pol-rivero
    Member

    Okay, in that case I'll upstream our fix too. Thanks for reporting!

  13. pol-rivero commented on Oct 16, 2026

    @pol-rivero
    Member

    @irl231 Quick question for the upstream PR: you mentioned that auto is de default model name, but I couldn't find any reference to exactly "auto" in the LiteLLM docs. Could you please link the documentation or tutorial you followed, which uses auto as the model name? Thanks!

  14. irl231 commented on Oct 17, 2026

    @irl231
    Author

    @pol-rivero https://docs.litellm.ai/docs/auto_router/#quick-start
    https://docs.litellm.ai/blog/autorouter-v2

    did you try this?

    model_list:
      - model_name: claude-haiku-4-5
        litellm_params:
          model: anthropic/claude-haiku-4-5
          api_key: os.environ/ANTHROPIC_API_KEY
      - model_name: claude-sonnet-5
        litellm_params:
          model: anthropic/claude-sonnet-5
          api_key: os.environ/ANTHROPIC_API_KEY
      - model_name: claude-opus-5
        litellm_params:
          model: anthropic/claude-opus-5
          api_key: os.environ/ANTHROPIC_API_KEY
    
      - model_name: auto # <- renamed from `smart-router` to `auto`
        litellm_params:
          model: auto_router/complexity_router
          complexity_router_config:
            tiers:
              SIMPLE:    claude-haiku-4-5
              MEDIUM:    claude-sonnet-5
              COMPLEX:   claude-opus-5
              REASONING: claude-opus-5
            classifier_type: heuristic
          complexity_router_default_model: claude-sonnet-5
    curl -X POST http://localhost:4000/v1/chat/completions \
      -H "Authorization: Bearer $LITELLM_API_KEY" \
      -d '{"model": "auto", "messages": [{"role": "user", "content": "What is 2+2?"}]}'
  15. added a commit that references this issue on Oct 17, 2026
    0780302
  16. pol-rivero commented on Oct 17, 2026

    @pol-rivero
    Member

    @irl231 Thanks!

    Also, the fix has been released in v3.6.7

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions