[Bug] Error: Provider rejected the request (invalid_request_error, 400): service_tier is not supported #1413
Replies: 1 comment
|
Confirmed this bug and root-caused it. Posting findings plus a ready fix per the contribution process — happy to open the PR if a maintainer invites it. Root cause. Verified against the live Copilot Business endpoint with identical
Proposed fix (minimal, provider-scoped — other providers still receive the configured tier): // GitHub Copilot endpoints reject the service_tier parameter entirely
// (400 "service_tier is not supported"), so omit it for Copilot models.
if (options?.serviceTier !== undefined && model.provider !== "github-copilot") {
params.service_tier = options.serviceTier;
}Branch with fix + regression test: https://github.com/yanksyoon/prime-agent/tree/fix/copilot-omit-service-tier The test ( |
Uh oh!
There was an error while loading. Please reload this page.
Affected area
AI providers and models
What happened?
I've installed prime-agent and logged into GitHub Copilot. I've selected gtp-5.6-luna and then when I tested it I got:
Error: Provider rejected the request (invalid_request_error, 400): service_tier is not supportedSteps to reproduce
Expected behavior
Model should respond.
Prime Agent version
0.7.2
Environment
macOS Tahoe 26.6.1
Additional context
Looks like there was a fix PR open for it but it got closed: #646
All reactions