goose: Unable to select Claude Sonnet as model for Copilot provider

From goose configure, choose Copilot:

┌   goose-configure 
│
◇  What would you like to configure?
│  Configure Providers 
│
◇  Which model provider should we use?
│  Github Copilot 
│
◇  Enter a model from that provider:
│  claude-3.7-sonnet
│
◇  Server error: Object {"error": String("An internal server error occurred.")}
│
└  Failed to configure provider: init chat completion request with tool did not succeed.

This is different from failing with a bad model string. We are using sonnet in VSCode and IDEA at the org level. The default (gpt-4o) works fine.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 15
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Also having this issue for claude-3.7-sonnet.

It’s strangely difficult to find the identifiers for the available models (and it differs per-account), but taking hints from aider’s docs, you can list all the models via:

apikey=$(jq -r 'first(.[]) | .oauth_token' ~/.config/github-copilot/apps.json)
curl -s -H "Authorization: Bearer $apikey" https://api.githubcopilot.com/models | jq -r '.data[].id'

Models that have worked:

  • gpt-4o
  • o3-mini

Models that seem broken:

  • claude-3.5-sonnet
  • claude-3.7-sonnet
  • gpt-4.1

gpt-4.1 gives:

◇  Enter a model from that provider:
│  gpt-4.1
│
◇  Request failed: error decoding response body
│
└  Failed to configure provider: init chat completion request with tool did not succeed.

While, the claude-* models give:

◇  Enter a model from that provider:
│  claude-3.7-sonnet
│
◇  Server error: Object {"error": String("An internal server error occurred.")}
│
└  Failed to configure provider: init chat completion request with tool did not succeed.

I think the errors have to do with tool usage. I can – if I configure it manually in the config file – tell e.g. claude 4 sonnet through github copilot to write me a spring poem and I get an answer. However, when I tell it to write the spring poem to a file, it crashes with the internal server error.

Today claude 4 sonnet works for me without really changing anything. 🤔

Just wanted to report that I was able to set Claude as the model by editing the config file directly:

❯ goose session
starting session | provider: github_copilot model: claude-3.7-sonnet
    logging to /Users/guga/.local/share/goose/sessions/20250523_101257.jsonl
    working directory: /Users/guga/

Goose is running! Enter your instructions, or try asking what goose can do.

( O)> hello
# Hello!

Welcome to Goose! I'm here to help you with various tasks. I have access to several tools that allow me to help you work with files, run commands, and more.

How can I assist you today? I can help with:

- Writing, editing, or viewing code files
- Running shell commands
- Finding files or information within your project
- Working with the Flux project you have open
- Capturing screenshots if needed

config.yaml

GOOSE_MODEL: "claude-3.7-sonnet"
extensions:
  developer:
    bundled: true
    display_name: Developer
    enabled: true
    name: developer
    timeout: 300
    type: builtin
GOOSE_PROVIDER: github_copilot