Skip to content

fix: PR #13 browser UA + issues #14/#15 (remaining delta after #11/#12)#16

Merged
OnlyTerp merged 1 commit into
mainfrom
integrate/open-prs-and-issues
Jun 11, 2026
Merged

fix: PR #13 browser UA + issues #14/#15 (remaining delta after #11/#12)#16
OnlyTerp merged 1 commit into
mainfrom
integrate/open-prs-and-issues

Conversation

@OnlyTerp

@OnlyTerp OnlyTerp commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Rebased onto main after PRs #11 and #12 merged. This PR now contains only the remaining delta:

PRs #11 (advertise [1m]) and #12 (preserve global model) are already on main — not duplicated here.

Test plan

  • python3 test_proxy.py
  • python3 scripts/doctor.py --no-test --ci
  • bash -n bin/ultracode

- PR #13: browser User-Agent (UC_BROWSER_UA) for openai_compat upstreams
- Issue #15: orchestrator_worker in /healthz, ultracode status, docs
- Issue #14: tool-only assistant content=null, context-length error hints, tests

PRs #11 and #12 were already merged to main; this branch carries only the delta.

Co-authored-by: Cursor <cursoragent@cursor.com>
@OnlyTerp OnlyTerp force-pushed the integrate/open-prs-and-issues branch from cbb14ed to 691ba02 Compare June 11, 2026 02:19
@OnlyTerp OnlyTerp changed the title Integrate open PRs #12/#11/#13 and fixes for #14/#15 fix: PR #13 browser UA + issues #14/#15 (remaining delta after #11/#12) Jun 11, 2026
@OnlyTerp OnlyTerp merged commit 45ec0bc into main Jun 11, 2026
12 checks passed
@OnlyTerp OnlyTerp deleted the integrate/open-prs-and-issues branch June 11, 2026 02:23

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment thread proxy.py
Comment on lines +228 to +229


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 _context_length_hint matches rate-limit and auth errors due to overly broad "token" keyword

The _context_length_hint function uses bare substring matching for "token" which is far too broad. It matches not just context-length errors ("too many tokens") but also rate-limit responses (e.g. OpenAI's "Rate limit reached ... on tokens per minute (TPM)") and auth errors ("The provided authentication token is invalid"). This appends a misleading hint telling the user to compact their session or switch to a backend with a larger context window, when the actual issue is rate limiting or invalid credentials. Verified by running the function against realistic upstream error bodies — all three false-positive scenarios fire.

Verified false positives
  • Rate limit 429: "Rate limit reached for gpt-4o on tokens per minute (TPM): Limit 30000" → hint fires
  • Auth error: "The provided authentication token is invalid" → hint fires
  • OpenAI JSON body type field: '{"type":"tokens","code":"rate_limit_exceeded"}' → hint fires
Suggested change
if any(x in low for x in ("context length", "context_length", "maximum context",
"too long", "too many tokens", "length exceeded")):
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant