Roo-Code: VS Code LM API - Copilot - Claude 3.7 Sonnet - "Model is not supported for this request."
Which version of the app are you using?
v3.7.4
Which API Provider are you using?
VS Code LM API
Which Model are you using?
Claude 3.7 Sonnet
What happened?
When submitting a prompt the error below is being returned immediately. This is happening only with both Claude 3.7 Sonnet and Thought models. It was working yesterday.
Request Failed: 400 {"error":{"message":"Model is not supported for this request.","param":"model","code":"model_not_supported","type":"invalid_request_error"}}
Steps to reproduce
- Choose API Prodiver: VS Code LM API with Copilot installed
- Select the Claude 3.7 Sonnet model
- Send any prompt
Relevant API REQUEST output
Additional context
No response
Edit: I just tested with Cline and it is also giving the same error. I’m wondering if they have blocked third party extensions.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 67
- Comments: 151
Hello everyone,
I wanted to share my recent experience using https://github.com/jjleng/copilot-more to integrate Claude 3.7 into Cline. It worked very well for me, and without a doubt, Claude 3.7 is the best LLM for this so far. However, I’ve just received an email from GitHub suspending my Copilot access.
Honestly, this is quite upsetting. Those of us subscribed to Copilot Pro made more use of its VS CODE LM API for Cline or Roo Code than GitHub Copilot itself, which doesn’t really function like a true agent—especially for those of us who rely on more advanced language models to code efficiently.
Nevertheless, it appears that using these unofficial integrations can lead to account suspension. I wanted to warn anyone considering using these tools that there is a real risk of getting banned. It’s especially frustrating for those of us who have paid for an annual Pro subscription and were happily using the VS CODE LM API (Roo Code or Cline), and now that Claude 3.7 is available, they’ve restricted it.
Thank you for reading, and I hope my experience helps others avoid similar issues. Let’s continue discussing this so GitHub can understand the community’s needs.
solution is pay the money, buy the real OpenRouter services
In my case It has been recovered for hours now, and it’s working fine inside GitHub Copilot. The problem appears when using it with VSCode LM API.
https://github.com/DaydreamCoding/github-copilot-freedom
@VietThuan I upgraded to 0.26.3 and it’s working fine. Each time you upgrade the extension, you need to re-patch and reload the window.
HERE IS THE FIX
Below is a step‐by‐step guide to remove the “x-onbehalf-extension-id” header from your GitHub Copilot Chat extension in VS Code. This will let you enable the additional models that GitHub now supports.
Step 1: Locate the Extension Folder
Open File Explorer and go to:
%USERPROFILE%\.vscode\extensions\Look for a folder with a name similar to:
github.copilot-chat-<version>Open your file manager or Terminal and navigate to:
~/.vscode/extensions/Then find the folder named like
github.copilot-chat-<version>Step 2: Open the
extension.jsFilegithub.copilot-chat-<version>folder, open thedistdirectory.extension.js.Step 3: Find the Header Code
extension.jsfile, use your editor’s search feature (usually Ctrl+F or Cmd+F)."x-onbehalf-extension-id"This string is used when the extension sets the request headers.
Step 4: Remove or Comment Out the Code
Once you locate the line or block of code that adds or checks the
"x-onbehalf-extension-id"header, you have two options:Prepend the line(s) with
//to disable the code.Delete the line(s) that add this header.
For example, if you see something like:
You can change it to:
Save your changes to the file.
Step 5: Restart Visual Studio Code
Step 6: Verify the Change
Troubleshooting
If you don’t see any change:
extension.jsfile.Backup:
Keep a backup copy of the original
extension.jsfile in case you need to revert the changes.This guide should help you implement the change. Let me know if you have any questions or need further clarification!
Below is the exact code snippet you’ll see and the minimal edit you need to remove the
"x-onbehalf-extension-id"header.1. Find This Snippet
Look for this portion in your
extension.jsfile (it might be on one long line):It will appear after the text:
… and near the references to
tools.length>128)throw new Error(…).2. Remove the Header Property
Simply delete the part that says
,"x-onbehalf-extension-id":${A}/${c}``. Make sure you also remove the preceding comma so that the syntax remains valid.So you go from:
to:
That’s it. Now the extension won’t send the
x-onbehalf-extension-idheader.3. Save & Restart VS Code
extension.js.Final Code Comparison
Before (with header):
After (header removed):
That’s all you need to do. Once VS Code is restarted, the extension should run without sending
"x-onbehalf-extension-id". If you later update the extension, you may have to repeat these steps. Let me know if you have any questions!this is a working solution. but use at your own risk https://github.com/jjleng/copilot-more
This issue is caused by Microsoft not wanting you to use the VS Code LM API. I am closing this issue.
Yes the copilot chat works just fine with both of the new claude 3.7 models. It’s just not working in Roo.
Quick Patch
Apply
A.
node copilot-lm-api.js ~/.vscode/extensionsB.node copilot-lm-api.jsApply for Windows
A.
node.exe .\copilot-lm-api.js $HOME\.vscode\extensions\B.node.exe .\copilot-lm-api.jsMicrosoft changed the business model of copilot. I posted feedback to Microsoft https://github.com/orgs/community/discussions/156026 Please upvote that feedback if possible
I was investigating the issue, I captured the request via fiddler and you can see the actual model they use for the request there
.
@truong211 this is asinine, 3.7 costs the same as 3.5.
i have the same issue, what is the solution? copilot chat works fine
https://github.com/DaydreamCoding/github-copilot-freedom
@valienteCDV Using VSCode’s LM API as per the official documentation is generally safe. However, copilot-more is a reverse-engineered API, which violates Copilot’s user agreement. This is similar to reverse-engineering the API from ChatGPT website—once detected, account suspension is highly likely.
Some details on this can be found here. Copilot-more bypasses restrictions by masking the request source, which is clearly against GitHub’s policy. Getting banned is just a matter of time, so I strongly do not recommend using it.
everything stopped working ,even the old 3.5 sonnet!!
Simulate the calling protocol of Github Copilot chat
@gituser08jndmx Thank you, the best wishes to you.
It’s funny because if GitHub co-pilot was better most of us would even care if it worked in cline and roo code
copilot-more author here. Want to repost my reddit write up here.
I feel really really sorry for people who have their account affected. But there is some misinformation I want to clarify.
People get banned mostly because of hitting 429 (rate limit) too often. Regardless that you use copilot-more or LM api, people get banned with LM API too. See https://www.reddit.com/r/RooCode/s/DAFs1k3v9c . I have used copilot-more personally for months without issues.
The screenshot of GitHub support posted earlier in this thread also addressed the extensions that use LM API as well. Basically, non official extensions (roo, cline) who burned too many tokens with LM API will be taken actions as well.
copilot-more never tried to impersonate copilot requests except the editor version header, which is required for the tool to work. But I left its client agent name as python. Some user asked if we could simulate real copilot requests, I rejected that. This is for GitHub to police this easily.
Always avoid sending in extreme amount of tokens regardless you use LM API or copilot-more. Given that we pay $10, copilot is already very generous with its limit.
Last words, copilot-more was created before roo and cline had built-in LM API integrations. It wasn’t meant to be created to exploit GH copilot. But I highly recommend people to exercise caution if they consider using it.
Maybe this debugging can be helpful It seems like the root cause is in model names
https://github.com/cline/cline/issues/1972#issuecomment-2686732561
I see there was a Upgrade that was Pushed a few Minutes ago on this Extension. i upgraded it, restart everything, but still encounter the same problem. - Windows 11
@DaydreamCoding – I just want to say that you are truly a remarkable human being doing a tremendous service to the community. I just updated to the recent versions of cline, github copilot and github copilot chat this morning and it was broken – this time with a new error code – and running your patch worked flawlessly. May the Divine’s blessings be upon you and your family and loves ones. Much love to you and respect!
Verified working with: Cline 3.11.1 GitHub Copilot 1.301.0 GitHub Copilot Chat 0.26.3
Credits to BareTread
Removing the
x-onbehalf-extension-idHeader from GitHub Copilot Chat ExtensionBelow is a step-by-step guide to remove the
x-onbehalf-extension-idheader from your GitHub Copilot Chat extension in VS Code. This will let you enable the additional models that GitHub now supports.Step 1: Locate the Extension Folder
Windows
macOS/Linux
Step 2: Open the
extension.jsFilegithub.copilot-chat-<version>folder, open thedistdirectory.extension.js.Step 3: Find the Header Code
Ctrl+ForCmd+F).Step 4: Remove or Comment Out the Code
Once you locate the line or block of code that adds or checks the
x-onbehalf-extension-idheader, you have two options://to disable the code.Example:
Before:
After (commented out):
Save your changes to the file.
Step 5: Restart Visual Studio Code
Step 6: Verify the Change
Troubleshooting
extension.jsfile.Backup
Keep a backup copy of the original
extension.jsfile in case you need to revert the changes.Exact Code Modification
Below is the exact code snippet you need to modify to remove the
x-onbehalf-extension-idheader.1. Find This Snippet
Look for this portion in your
extension.jsfile:It will appear after the text:
… and near the references to:
2. Remove the Header Property
Simply delete the part that says:
Make sure you also remove the preceding comma to keep the syntax valid.
Before:
After (header removed):
Step 7: Save & Restart VS Code
extension.js.Final Code Comparison
Before (with header):
After (header removed):
Conclusion
That’s all you need to do! Once VS Code is restarted, the extension should run without sending
x-onbehalf-extension-id. If you later update the extension, you may have to repeat these steps.No it is not working. Both Cline and RooCode. Copiplot is working well.
I occured the same issue, awaiting for the solution. My copilot chat works fine.
Just wanted to give everyone an update. I’ve been a heavy user of Claude-3.7-Sonnet > VS Code LM API > Cline > VS Code for several months now. I’ve worked around rate limits (including juggling multiple GitHub Copilot Business/Enterprise subscriptions daily) and leaned on incredible community workarounds—shoutout to @DaydreamCoding.
But as of today, April 16, 2025, I’ve switched to Gemini-2.5-Pro-Preview-03-25 > Google Gemini > Cline > VS Code, and it absolutely blows away the competition.
The context window alone makes it superior to Claude in so many ways. I was previously forced to build React apps in ultra-small modular components just to stay within Claude’s limits. But with Gemini-2.5-Pro-Preview-03-25—despite Cline claiming it “does not support computer use” (it absolutely does, and it’s amazing)—I fed it 60 pages of documentation for Zoho CRM v7 and had it fully analyzed in under a minute. Within 5 minutes, I had a server-based custom portal built, giving my customers and contractors full access to Zoho’s platform.
This is a game changer like nothing I’ve seen before. Sure, cost is something to consider—but for me, replacing 8 Copilot Business subs at $160/month is a net win. More importantly, tasks that took 3 hours with Claude-3.7-Sonnet now take 30 minutes or less with Gemini.
The long context window changes everything.
Just wanted to share this for those of us pushing the edge of what AI-assisted coding can do. Nothing I’ve tried comes close to Gemini-2.5-Pro-Preview-03-25 > Google Gemini > Cline > VS Code.
Cheers, and God bless!
So basically, it doesn’t work also for Copilot Chat, however in the system message they have put
{“role”:“user”,“content”:“what llm model are you”},{“role”:“assistant”,“content”:“I’m GitHub Copilot, and I use the Claude 3.7 Sonnet (Preview) large language model as mentioned in my system instructions.”
so if you ask it it will tell you that it is 3.7, however at the end of the body I can see they are using gpt-4o-mini instead
I confronted it and it told me - Based on my capabilities and instructions, I’m using Claude 3.7 Sonnet (Preview). That said, the specific version isn’t as important as being able to provide useful assistance with your project."
The GitHub Copilot version 0.26.3 no longer supports the method of removing the “x-onbehalf-extension-id” to use Claude 3.7 Sonnet. I had to revert to version 0.26.2 to continue using it. Is it possible that GitHub Copilot will soon prohibit the use of this model via Cline and RooCode?
Hey @DaydreamCoding just wanted to say thanks. Your fix (https://github.com/RooVetGit/Roo-Code/issues/1203#issuecomment-2727531096) worked for me.
Technically yes, but in my personal experience having used both, a personal Copilot Pro subscription is more likely to get banned or flagged as opposed to those running through an organization using the GitHub Copilot Business subscription. Also, I have no way to confirm if they have the exact same rate limits – to my knowledge, there’s no usage report for personal Copilot subscriptions and the one I just ran at the organization level for Copilot usage is nebulous at best:
In either case, we know there are rate limits for either type of subscription, but do we actually know what those rate limits are? Are they spelled out somewhere on GitHub’s or Microsoft’s website? I have searched (admittedly, not that thoroughly) and haven’t really found anything definitive.
Have my account suspended, I hardly used make any requests (like only < 1 millions in total). Don’t use VSCode LM if you want to have your account suspended.
This might not be obvious to everyone: Removing “x-onbehalf-extension-id” is bypassing an intentional block that GitHub is putting on using the VSCode LM API by certain extensions. You’re risking an account suspension by doing this. I want this too, but we need to wait for Microsoft to at least explain what’s allowed and what isn’t.
just remove “x-onbehalf-extension-id” from the file “github.copilot-chat-x.x.x/dist/extension.js”, and all plugins using the VS Code LM API can use claude-3.7-sonnet.
Hey @hannesrudolph! 👋 I’m Dosu, here to help you with any bugs, questions, or contributions while you wait for a human maintainer.
The issue discussed in this thread revolves around the error message “Model is not supported for this request” when using the Claude 3.7 Sonnet model with the VS Code LM API in Roo Code. This problem seems to be affecting multiple users, and it appears to be related to capacity limitations and prioritization of GitHub Copilot Chat users over third-party applications like Roo Code and Cline.
Several users have attempted to use the “copilot-more” tool as a workaround, which allows integration with models like Claude 3.7 Sonnet. However, this approach has led to account suspensions due to violations of GitHub’s terms of service, as it involves reverse-engineering the API and potentially exceeding rate limits.
The maintainers have acknowledged the issue but indicated that there is little they can do from the Roo Code side. Users are advised to be cautious with unofficial integrations like “copilot-more” due to the risk of account suspension. The problem seems to be a temporary restriction by GitHub to manage capacity, and users are encouraged to use official channels and models that are currently supported.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@valienteCDV
You got suspended for bypassing the VS Code LM API, and using an unofficial (not allowed) 3rd party API proxy. Using the linked project is immediately against the terms of service.
could you provide @vatva693 a guide to install this? i get the http://0.0.0.0:15432 server running but on roo cline i set base url http://localhost:15432 api key (what does it go in here?) model claude-3.7-sonnet
and i get
Error Unexpected API Response: The language model did not provide any assistant messages. This may indicate an issue with the API or the model’s output.
Roo is having trouble… This may indicate a failure in his thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. “Try breaking down the task into smaller steps”).
I tried copilot-more recommended by @shiplove-fast but unfortunately couldn’t get it to work as well. There is an issue open on the repo with some people having the same
421: API error: Misdirected Requesterror as I am getting.Unfortunately I’m not aware of anything that we can do about this on the Roo Code end, but if anyone has ideas let me know!
Your 100% right,
Same Issue, Cline and RooCode, Chat works fine. Was working yesterday morning, then there was the shutdown, but GitHub status says it resolved now.
same issue on roo, copilot chat can work well
No, I haven’t been using OpenAI’s 4.1 model. At the moment, I’m jumping back and forth between Claude and Gemini. Just fully vetting those two and learning their intricacies is a challenge in itself. I’ve never had much luck with OpenAI models inside my IDE, so I haven’t prioritized testing newer versions.
For me, it’s all about deeply understanding the tool — knowing how it fails, when it makes big mistakes, and where it falls short in terms of reasoning and debugging. Gemini is incredibly fast and has excellent coherence, but it’s not great at debugging.
I’ve been working on a very complex React app. Gemini and I spent 18 hours troubleshooting a dev dependency issue — specifically, trying to figure out why a local monorepo environment couldn’t be deployed to a server running the exact same environment without throwing dependency errors. Turns out, the issue was tied to a compression script that was packaging everything together. Somehow, the script was excluding files from the deployment package.
Twice, I performed a diff analysis with Gemini to compare the local package contents with the production ZIP — both times there were clear differences. I pointed this out to Gemini both times, yet it enthusiastically insisted that the differences couldn’t be the cause of the problem. After 18 hours of back-and-forth, I finally zipped the local deployment package myself, uploaded it to the server, and relaunched the app — and voilà, all dependency issues were resolved.
It was the first time I ever typed multiple berating insults and curse words to an AI in my IDE — furious that it had ignored repeated statements about the diff results. I even made it draft an email to Google API billing support, insisting that the charges for 18 hours of usage be refunded, with a full explanation that it was the AI’s fault. And get this — Google support actually accepted the email and is crediting my account. Wild ending to an infuriating journey caused by the simplest oversight.
So yeah — it’s all about learning how the tool behaves. Gemini is fantastic for certain tasks, and its coherence across a working codebase is superior to Claude. But Claude is marginally better at debugging — especially when used in ACT mode with Copilot. If you have the right Copilot subscription, the rate limits have improved significantly. I’ve gotten up to ~150 API calls before needing to switch accounts.
Anyway, hope that sums it up. Best of luck with your own experiments.
Yes, verified as of today, April 16, 2025. I guess I should’ve been less ambiguous in my comments above…
“But as of today, April 16, 2025, I’ve switched to Gemini-2.5-Pro-Preview-03-25 > Google Gemini > Cline > VS Code, and it absolutely blows away the competition.”
“But with Gemini-2.5-Pro-Preview-03-25—despite Cline claiming it “does not support computer use” (it absolutely does, and it’s amazing)—I fed it 60 pages of documentation for Zoho CRM v7 and had it fully analyzed in under a minute.”
İs that working now?
I just found out about the possibility of using Copilot LLMs with Roo theses days and it was already not working, so I don’t know about speed changes.
To get it working I had to ask something to Claude 3.5 in the Copilot and click “Enable” when asked (again). I was in the impression that Roo would use the selected LLM in Copilot and I tryed just 4o and Gemini. Today, after reinstall Roo and Copilot extensions I tryed Claude and now it is all working.
Tks
/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js /Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.css
If you replace the workbench.desktop.main.js and workbench.desktop.main.css from version 0.46 into 0.47, the copilot chat window will be restored, but the billing prompt will be lost
Cursor 0.47 blocks the Copilot Chat window. You need to downgrade to 0.46 or 0.45.
Could you provide more details on how to use the Copilot Chat model with Cursor? I’m looking into implementing it and would appreciate any insights or guidance you can offer. Thanks in advance!
These rate limits are irrelevant and are for the Github Models product.
Update, found the rate limits associated with each GitHub Copilot Subscription level:
https://docs.github.com/en/github-models/prototyping-with-ai-models#rate-limits
It doesn’t say specifically what the rate limits are for the Claude Sonnet family of models, but it does list generally at the top:
NOTE: after carefully reviewing the information relating to the “Low” and “High” Rate limit tiers, they seem to have some of the information inversed because in some cases the “Low” Rate limit tier has higher values than the “High” Rate limit tier – so clearly whoever was responsible for populating the values in that table wasn’t paying attention.
Rate limits
per Rate limit tier
and then per Subscription level
and then beneath that section, it lists specific rate limits per model
Yes, I was confirming in my previous post that it was working and has been working for me across 4 GitHub member accounts within my organization which utilizes the GitHub Copilot Business" subscription for each member account.
In cursor it worked with my current versions. The vscode chat tab is dead now though (I have never used it anyway =D). Great job in finding this exploit. I confirm that claude 3.7 can call tools
Did anyone use this without getting banned?
I believe that they could identify the missing header and ban ppl eventually?
Not working with Sonnet 3.7
this gave me a good idea for another mcp server. Aider has this funcionality. Not sure how to port this to your use case. It seems that we would need to go in a high level like this:
I will do it. I guess that I will end up needing to have a config per OS (linux, macos, windows)
do you think it would be possible to have Github copilot use 3.7 thinking to reason and plan, and then send to edit with RooCode with sonnet 3.5 so it only executes? maybe a MPC that serves as a bridge? is there a RooCode api we can use to handle this?
Yes, but I was wondering if the ban of @chuanhhoang was because of these (or other) modifications.
It seems to be a UI design issue causing the obstruction?
So, don’t hitting 429 (rate limit), it’s may get your subscription suspended
@alioshr business
It was too good to be true. For someone like me who just switched from wordpress to nextjs/svelte, I was able to realize great projects with the help of AI. Cline/Roo code in combination with LM API (no copilote-more) made it attractive for the wallet as well.
For me, 3.5 still works, and I use 3.7 for copy-paste here and there.
Nevertheless, the anticipation was huge and the disappointment is there.
But let’s not kid ourselves - a little patience and there will be affordable models with which web creatives like me can implement full-stack projects.
the main problem is that it gets rate limit super fast
@majdaleid look up at @shiplove-fast 's comment. I have tested it and it works
same issue here it is enabled in the settings
same here not working
It was working initially in the Roo code, then I saw Claude 3.7 Sonnet removed from the Roo code- VS Code LM API and then came back after few hours, from that time it’s not working 😦
Same issue here too.
same. if anyone has ideas let me know!
me too
The new Claude 3.7 Sonnet model has low capacity and is limited, so they are prioritizing GitHub Copilot Chat users first and temporarily disabling third party use of Claude 3.7 until they have more capacity.
Same here
me too
Same here