Skip to content

GitHub Copilot does not work with Anthropic models #108

@PSPedro176

Description

@PSPedro176

When I execute ucode copilot, the default model has been databricks-claude-sonnet-4-6.
The agent and the foundation endpoints are successfully connected. As you can see in the screenshot, the agent replies to a first answer.

Image

The problem starts when Copilot needs to actually build code, it starts to fail with Request failed (transient_bad_request). Retrying..., and then returns a 400 error code. This is the complete error log from system tables:

"BAD_REQUEST","message":"{\"message\":\"messages.1: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_bdrk_01AmW4HfrYk28ucreXRqJddF. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}"

It looks like a problem to connect any Anthropic models to GutHub Copilot that are not from Anthropic.
Before ucode release, I even tried to connect Copilot to our AI Gateway following this BYOK Doc from GitHub, but had the same results.

There is another doc on GitHub Copilot BYOK that show Anthropic models being used only directly via Anthropic endpoint, but not a third-party one, like Databricks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions