GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): add vpn hint to free tier and rate limit errors by JayadityaGit · Pull Request #56475 · anomalyco/opencode

Conversation

@JayadityaGit

@JayadityaGit JayadityaGit commented Oct 17, 2026 •
edited by opencode-agent Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #56474

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When requests fail due to VPN or proxy IP filtering (\can only be used from within OpenCode) or shared IP rate limiting (\Rate limit exceeded), this PR appends \If you are using a VPN or proxy, try disconnecting it.\ to the error message in \ oSessionError. This prevents users from assuming their local client or auth is corrupted.

How did you verify your code works?

Added unit tests in \packages/core/test/session-error.test.ts\ verifying both error messages are enriched correctly, and ran \�un test packages/core/test/session-error.test.ts\ (11/11 tests pass).

Screenshots / recordings

N/A (terminal error message enhancement)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #56334, #56398, #56373, #56397, #56425, #56338, #56111, #56431

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JayadityaGit
fix(core): add vpn hint to free tier and rate limit errors
f65c7be
@github-actions

github-actions Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@opencode-agent opencode-agent Bot mentioned this pull request Oct 17, 2026
Add VPN disconnection hint to free-tier and rate limit error messages #56474
Closed
opencode-agent[bot]
opencode-agent Bot reviewed Oct 17, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The free-tier error now gets the hint as described, but the rate-limit match is too broad to merge as is.

I checked it by calling toSessionError on the base and on this PR with a free-tier AuthenticationError and with a non-OpenCode RateLimitError. I also ran bun test test/session-error.test.ts (passes) and bun run typecheck in packages/core (clean).

Public API: unchanged. Only the text of SessionError messages changes; no types, events or config keys change.

Concerns:

  • Applies to every provider. message.includes("Rate limit exceeded") runs on every provider's errors. A plain Anthropic/OpenRouter/OpenAI 429 such as Rate limit exceeded: … per-minute quota now ends with "If you are using a VPN or proxy, try disconnecting it.", which is misleading there. Please limit the hint to errors from the OpenCode gateway, matching on something structured such as a gateway error code in reason.body, the way tokenSharingMessages does, rather than on English message text. The gateway may also be a better place for this hint, since it owns both messages.
  • Model-visible text. The changed message is also what the model sees as the error, so any hint added here reaches the model too. Keep it tightly scoped.

Related: #56334, #56398, #56373, #56397, #56425, #56338, #56111, #56431

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/core/src/session/to-session-error.ts Outdated
}

function vpnHint(message: string) {
if (message.includes("can only be used from within OpenCode") || message.includes("Rate limit exceeded")) {

@opencode-agent opencode-agent Bot Oct 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

providerError runs for every provider, so "Rate limit exceeded" also matches ordinary 429s from Anthropic, OpenRouter, OpenAI and others. I checked: Rate limit exceeded: anthropic/claude per-minute quota becomes … per-minute quota. If you are using a VPN or proxy, try disconnecting it. Could this be limited to the OpenCode gateway's errors, e.g. by matching a gateway error code in reason.body like tokenSharingMessages does, instead of English message substrings?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JayadityaGit JayadityaGit Oct 17, 2026

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for pointing it out

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@JayadityaGit

JayadityaGit commented Oct 17, 2026

Copy link
Copy Markdown
Author
after

I did not know my vpn was the cause, i had to figure it out the cause, so i had added a small hint to the existing erros, so that it will be helpful to the future devs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JayadityaGit

JayadityaGit commented Oct 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Author

this was my userflow, when i was discovering the issue

when i turn on my vpn , and i used opencode for the first time it gave this error

Error: OpenCode's free tier can only be used from within OpenCode. Download it at https://opencode.ai and keep building.

i turned off my vpn and it worked fine, and again to test it i turned on my vpn again and now there seems to be new error which says

Error: Rate limit exceeded. Please try again later.

i turned off my vpn and it works

so i made changes according to that.

thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JayadityaGit
fix(core): restrict vpn hints to opencode gateway error codes
69877c5
@opencode-agent opencode-agent Bot mentioned this pull request Oct 18, 2026
custom openai-compatible provider: free-tier models rejected with "free tier can only be used from within OpenCode" even in official OpenCode #56662
Closed
@JayadityaGit JayadityaGit closed this Oct 20, 2026
@opencode-agent opencode-agent Bot mentioned this pull request Oct 21, 2026
It has been weeks since I last used OpenCode, but it's telling me I've already reached today's free message limit on my very first message. #57746
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencode-agent opencode-agent[bot] opencode-agent[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add VPN disconnection hint to free-tier and rate limit error messages

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@JayadityaGit
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.