Skip to content

chore(backport): add the remaining jev changes to stable/1.100.x - #42668

Open
devin-ai-integration[bot] wants to merge 19 commits into
stable/1.100.xfrom
litellm_jev_backport_1_100_x
Open

devin-ai-integration[bot] wants to merge 19 commits into
stable/1.100.xfrom
litellm_jev_backport_1_100_x

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

How it solves it:

  • Cherry-picks the six follow-up Jev PRs from main onto stable/1.100.x, one commit per PR, original author kept
  • Ports the three main prerequisites those picks build on as their own commits
  • Adapts the dashboard pieces to what this line ships and regenerates the openapi snapshot and api types under Python 3.12
  • No version bump in this PR; the release bump is handled separately

Included PRs:

Backport notes: git cherry-pick -n -m 1 from the main merge commit for cf42b60, 34718f0, 2edda5a, 1e161f5 and a83773c, plain pick for the #42301 squash 1106b16, each committed with the original author, subject and a two-line provenance body. 4bfac88281 (the stable dashboard adaptation from #42595) is picked with -x right after #41886

Prerequisites, each its own commit with a provenance body naming the main sha: 7015bf37bb (apply team model aliases on the JWT auth path), 109ca70f66 (allow opted-in team members to manage their routers: the DatabaseClient protocol, AUTO_ROUTER_MANAGE, the prisma_client kwarg on can_key_call_model / can_team_access_model, the lazy team_membership params on _check_team_member_model_access, the member dry-run plumbing and matching test helpers) and 510424c86c (classifier circuit breaker, which the Jev classifier plugs into)

Conflicts resolved, always toward what main has after the pick: litellm/types/utils.py, complexity_router.py and config.py in #41615 (this line lacks the capability, llm_v2 and fuse features, so the Jev hunks were applied on the line's code), StoredComplexityRouterConfig still lives in edit_auto_router_modal.tsx here so the jev fields went there, schema.d.ts and _lazy_openapi_snapshot.json took ours plus each pick's delta and were then regenerated wholesale (see below). Own follow-up commits, all Devin identity with a body: fix(ui): adapt the jev dashboard pieces to stable/1.100.x, fix: place lint suppressions on the flagged annotation lines, fix(typing): clear the basedpyright errors the picks introduced

Generated artifacts: #41615 and #41757 brought litellm/proxy/_lazy_openapi_snapshot.json and ui/litellm-dashboard/src/lib/http/schema.d.ts verbatim from main. chore(backport): regenerate the openapi snapshot and dashboard api types for stable/1.100.x regenerates both under Python 3.12 (uv sync --python 3.12 --inexact --frozen --extra proxy --group proxy-dev --group e2e-dev, scripts/prisma_generate_if_needed.py, python -m litellm.proxy._lazy_openapi_snapshot, npm run gen:api), so the snapshot drops agent_365 from the unreachable_fallback description and schema.d.ts drops the upstream-only classifier surface and JsonValue and gains /auto_router/manage

Review-loop follow-ups after a392f7b, all Devin identity with a body: 54b42e3f05 ports main's member auto-router write path and grant plumbing (the write slot in model_management_endpoints, StoredAutoRouterIdentity wiring, the license feature helpers, team tpd_limit, Router.config_deployments, the member_auto_router flag and the team grant relations), which Bugbot found unwired on this line after the picks; 4864227716 restores the member-scope test matrix and covers team tpd_limit; 77915d43b8 ports append_team_models so a member create no longer leaves an orphaned router row when the endpoint-level authorization fails (Greptile P1); e39e1c8dea takes main's pg_advisory_xact_lock before the member name-collision check (Bugbot race). The other three lines (1.99.x, 1.101.x, 1.102.x) do not carry this member write path, so 55d1597645 reverts all four of those commits in one revert commit. Jev never calls the member write path, and after the revert the branch is byte-identical to a392f7b except for one three-line change in complexity_router.py: _is_classifier_timeout also matches litellm.exceptions.Timeout, which main and every other stable line already have, so a Jev classifier timeout trips the circuit breaker instead of counting as a generic failure

Checks run on the tip a392f7b and repeated on e39e1c8; at 55d1597 the touched Python files were rerun (791 passed, 0 failed across complexity_router, test_auth_checks.py, test_model_management_endpoints.py, test_team_endpoints.py), and the generated artifacts are unchanged from a392f7b, so the dashboard checks from that tip still apply. Python: every tests/test_litellm file the picks touch was run in the worktree with LITELLM_LOCAL_MODEL_COST_MAP=True, 658 passed, 14 failed; the 14 are the requires_semantic_router tests in test_complexity_router.py, which fail on the line's tip before these picks too because semantic_router is not installed. Dashboard, under ui/litellm-dashboard: npx vitest run on every touched test file PASS, npx eslint on every changed file PASS with 0 errors and no new local / no-large-inline-object-arg warnings, npx tsc --noEmit on non-test sources PASS, npm run test:types PASS, npm run build PASS. make check at the repo root: FAIL, on exactly one finding, TQ002: total 743 over limit 742 (this change added 1) - tests/test_litellm/test_router.py:2969. That file is byte-identical to origin/stable/1.100.x and no commit on this branch touches it. The gate measures against merge-base(origin/litellm_internal_staging, HEAD), so it counts drift the stable line picked up since it forked. Running the same gate with the line as base, scripts/test_quality_gate.py --base origin/stable/1.100.x, prints OK: every TQ rule is within its test-suite ceiling. Every other make check gate passed. No budget JSON was edited

User Flow

Before: an admin on stable 1.100.x cannot use Jev anywhere except the raw passthrough

  1. The admin sets TYPESAFE_API_KEY, starts the proxy from stable/1.100.x and opens http://localhost:4000/ui/?page=models to add an auto-router
  2. The classification method dropdown offers only the LLM classifier, there is no Jev option
  3. They add a typesafe_compaction guardrail to config.yaml and the proxy refuses to start with an unknown guardrail error
  4. A developer sends POST http://localhost:4000/auto_router/test_routing with "classifier_type": "jev" and gets 422, jev is not an accepted classifier
  5. A developer sends POST http://localhost:4000/openrouter/api/alpha/decisions and gets 404

After: the same admin configures Jev routing, compaction and budgets from the UI and API

  1. The admin sets TYPESAFE_API_KEY, starts the proxy from this branch and opens http://localhost:4000/ui/?page=models to add an auto-router
  2. The classification method dropdown offers Jev, the connection test returns a tier for the sample prompt, and the router saves
  3. They add the typesafe_compaction guardrail and the proxy starts and trims low-relevance turns before forwarding
  4. The developer sends the same POST http://localhost:4000/auto_router/test_routing and gets 200 with "cause": "jev_classifier" and the chosen tier
  5. The developer sends POST http://localhost:4000/openrouter/api/alpha/decisions and gets the OpenRouter decision back with 200, logged with spend under typesafe/jev-1.13
  6. A virtual key over its budget that sends a Jev test-routing request gets 400 with the budget error instead of a free classification

Relevant issues

Backport of #41615, #41723, #41757, #41879, #41886 and #42301. Follows #42597 on this line and mirrors #42595

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Two proxies from two worktrees, 2 uvicorn workers each, own Postgres each, real TypeSafe, OpenRouter and OpenAI calls, no mocks. Before is the merge base on port 18400, After is the PR tip on port 18401

Before (9c1216a)

POST /openrouter/api/alpha/decisions

$ curl -s -X POST -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{"model":"typesafe/jev-1.13","state":"draft","questions":{"q1":{"type":"choice","instructions":"which","options":{"a":"x","b":"y"},"criteria":{"c":"z"}}}}' http://localhost:18400/openrouter/api/alpha/decisions
{"detail":"Not Found"}

POST /model/new with a jev auto-router

$ curl -s -X POST -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{"model_name":"qa2-jev-router","litellm_params":{"model":"auto_router/complexity_router","complexity_router_config":{"tiers":{"SIMPLE":"gpt-4o-mini"},"classifier_type":"jev","jev_classifier_config":{"model":"jev-latest"}}}}' http://localhost:18400/model/new
{"error":{"message":"complexity_router_config is invalid at classifier_type: Input should be 'heuristic', 'llm', 'custom' or 'heuristic_first'. The router would drop this deployment at load time, so the write is rejected instead.","type":"validation_error","param":"litellm_params.model","code":"400"}}

POST /auto_router/test_routing with a jev classifier

$ curl -s -X POST -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{"prompt":"<long prompt>","complexity_router_config":{"tiers":{"SIMPLE":"gpt-4o-mini","COMPLEX":"gpt-4o"},"classifier_type":"jev","jev_classifier_config":{"model":"jev-latest"}}}' http://localhost:18400/auto_router/test_routing
{"detail":[{"type":"literal_error","loc":["body","complexity_router_config","classifier_type"],"msg":"Input should be 'heuristic', 'llm', 'custom' or 'heuristic_first'","input":"jev", ...}]}

Over-budget member key on /auto_router/test_routing

Not reachable: the jev classifier config is rejected at validation before the budget check runs

After (55d1597)

POST /openrouter/api/alpha/decisions

$ curl -s -X POST -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '<same body>' http://localhost:18401/openrouter/api/alpha/decisions
{"model":"typesafe/jev-1.13-20260917","answers":{"q1":{"type":"choice","choice":"c","probabilities":{"c":1},"confidence":1}},"usage":{"input_tokens":290,"output_tokens":25,"cost":0.00001218},"id":"gen-dec-1790173805-KVC153WjDlNzlHOZHwDd","provider":"TypeSafe"}

POST /model/new with a jev auto-router

$ curl -s -X POST -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '<same body, model_name qa55-jev-router>' http://localhost:18401/model/new
row saved, model_id 6e6dda00-1727-48e7-949a-f432e407ecfc
$ curl -s -X POST -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{"model":"qa55-jev-router","messages":[{"role":"user","content":"say ok"}]}' http://localhost:18401/v1/chat/completions
200, model qa55-jev-router, content "Ok!" (real OpenAI completion)

POST /auto_router/test_routing with a jev classifier

$ curl -s -X POST -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '<same body>' http://localhost:18401/auto_router/test_routing
{"routed_model":"gpt-4o","routed_model_configured":false,"routing_decision":{"router_model_name":"auto_router_routing_test","router_type":"complexity","routed_model":"gpt-4o","cause":"jev_classifier","tier":"COMPLEX","signals":["jev-classifier:COMPLEX","jev-confidence=0.870000","tier-probability:COMPLEX=0.900000","tier-probability:REASONING=0.100000","tier-probability:MEDIUM=0.000000","tier-probability:SIMPLE=0.000000"],"classifier_model":"typesafe/jev-1.13.0","classifier_cost":0.000024486,"classifier_probabilities":{"COMPLEX":0.9,"REASONING":0.1,"MEDIUM":0.0,"SIMPLE":0.0},"classifier_confidence":0.87,"conversation_continuing":false}}

Over-budget member key on /auto_router/test_routing

Member key under a team with team_member_permissions=["/auto_router/manage"], max_budget=0.000001, spend pushed over the cap by one real gpt-4o-mini completion

$ curl -s -X POST -H 'Authorization: Bearer <member key>' -H 'Content-Type: application/json' -d '{"prompt":"write a fizzbuzz in python","team_id":"9bc6aec5-2389-4c7d-9dda-3d98ba6c12f5","complexity_router_config":{"tiers":{"SIMPLE":"gpt-4o-mini"},"classifier_type":"jev","jev_classifier_config":{"model":"jev-latest"}}}' http://localhost:18401/auto_router/test_routing
{"error":{"message":"Budget has been exceeded! Key=key (sk-...n05w) Current cost: 2.55e-06, Max budget: 1e-06","type":"budget_exceeded","param":null,"code":"400"}}

Also on the After side: GET /typesafe/v1/models returns the TypeSafe model list, and a typesafe_compaction guardrail loaded from config shows up in GET /v2/guardrails/list

Before evidence rerun on the same rig: merge base 9c1216a427 on port 18400 returns {"detail":"Not Found"} on the decisions POST, rejects the jev classifier_type on /model/new with the 'heuristic', 'llm', 'custom' or 'heuristic_first' literal error, and rejects classifier_type=jev on /auto_router/test_routing with the same literal error

Type

🆕 New Feature

Caveats (if any)

Medium

  • Commits 54b42e3 through e39e1c8 ported main's member auto-router write path to close Bugbot and Greptile findings on a helper that 109ca70 brought in but nothing on this line calls; 55d1597 reverts them so the line matches stable/1.101.x and 1.102.x, which ship the same unused helper. Those findings describe the member feature, not Jev
  • make check fails on this branch on TQ002 in tests/test_litellm/test_router.py, a file this branch does not touch; the same gate passes with --base origin/stable/1.100.x

Low

  • fix: place lint suppressions on the flagged annotation lines (46f81ba) has no commit body; rewriting it would need a force push
  • The 14 requires_semantic_router tests fail on the line's tip with or without this PR

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
  • 55d1597 passes /live-pr-risk

Note

Medium Risk
Adds request-mutating guardrails, new external classifier/spend paths, and expanded auto-router authorization; misconfiguration could block requests or allow unintended model spend on dry-run routes.

Overview
Backports the remaining TypeSafe Jev surface onto the stable line: complexity auto-routers can use classifier_type: jev, with HTTP calls to TypeSafe /v1/systemone, spend logging, routing-decision probabilities/confidence, and a process-local classifier circuit breaker (also wired for LLM classifiers) so timeouts do not hammer every session.

Adds a typesafe guardrail that compacts chat history by asking Jev whether older tool exchanges are still relevant and blanking low-scoring results (configurable fail_open / fail_closed). OpenRouter gets a /openrouter/* passthrough, allowlist entries, and pricing for openrouter/typesafe/jev-1.13; OpenRouter /alpha/decisions reuses the TypeSafe passthrough spend logger.

Auto-router management tightens who can validate or test routing: team members need premium plus /auto_router/manage, dependency models are checked against team/key/org/project scope (including access groups via prisma_client), JEV test routing respects virtual-key budgets, and tests can load a saved deployment by saved_model_id. Supporting changes include team_grants to keep JWT team fields aligned with virtual-key auth, richer TypeSafe passthrough HTTP methods, evaluation router deps excluded from health dependency sweeps, and Jev credential merge when patching stored complexity-router configs.

Reviewed by Cursor Bugbot for commit 55d1597. Bugbot is set up for automated code reviews on this repo. Configure here.

Link to Devin session: https://app.devin.ai/sessions/dcedce8035d64a199713bae4b2b90b7f
Open in Devin Desktop: https://app.devin.ai/desktop/session/dcedce8035d64a199713bae4b2b90b7f?variant=devin
Requested by: @mateo-berri

ryan-crabbe-berri and others added 14 commits September 23, 2026 03:14
Prerequisite for #41615 on stable/1.100.x.

Cherry-picked from 7015bf3 (main).
Prerequisite for #41615 and #41879 on stable/1.100.x.

Cherry-picked from 109ca70 (main).
Prerequisite for #41615 on stable/1.100.x.
Cherry-picked from 510424c (main).
Backport of #41615 to stable/1.100.x.
Cherry-picked from cf42b60 (main).
Backport of #41723 to stable/1.100.x.
Cherry-picked from 34718f0 (main).
Backport of #41757 to stable/1.100.x.
Cherry-picked from 2edda5a (main).
Backport of #41879 to stable/1.100.x.
Cherry-picked from 1e161f5 (main).
Backport of #41886 to stable/1.100.x.
Cherry-picked from a83773c (main).
…pes for stable/1.100.x

The #41615 and #41757 picks brought litellm/proxy/_lazy_openapi_snapshot.json and ui/litellm-dashboard/src/lib/http/schema.d.ts verbatim from main. Both files were regenerated under Python 3.12.
Merge debris cleanup and 1.102.x-only imports fixed; usesClassifierContext re-exported, JEV custom-tier emission, and preset test adapted to the static preset registry.
The type check gate flagged six new reportArgumentType errors and one reportGeneralTypeIssues error over base: an outcome Final rebinding in the fallback path, a Mapping handed to the dict-typed request_kwargs parameter, optional message sequences passed to a non-optional parameter, DatabaseClient where PrismaClient is expected on two access-group lookups, the effective-config helper object return passed to the Mapping-typed validator, the project row passed to can_project_access_model, and the Response or None from AsyncHTTPHandler.post. The flagged sites now pass the right shape or carry a rule-scoped pyright ignore with the reason.
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

CLAassistant commented Sep 23, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
5 out of 7 committers have signed the CLA.

✅ ryan-crabbe-berri
✅ moe-berri
✅ mateo-berri
✅ tin-berri
✅ yuneng-berri
❌ devin-ai-integration[bot]
❌ yassin-berriai
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no outstanding findings

Summary

This backport adds TypeSafe Jev classification, compaction, routing-test budget enforcement, OpenRouter decision passthrough, and matching dashboard support to stable/1.100.x

  • Adds Jev as a complexity-router classifier with fallback, circuit-breaker, cost, and routing metadata support
  • Adds the TypeSafe relevance-compaction guardrail and authenticated provider passthrough routes
  • Adds dashboard configuration, connection testing, generated API types, pricing data, and focused tests
  • Reverts the unrelated member auto-router write-path backports while retaining explicit LiteLLM timeout recognition

Reviews (8) · Last reviewed commit: "revert(proxy): drop the member auto-rout..."

Comment thread litellm/proxy/management_endpoints/model_management_endpoints.py
Comment thread litellm/proxy/guardrails/guardrail_hooks/typesafe/typesafe.py
Comment thread litellm/proxy/management_helpers/auto_router_permissions.py
Comment thread litellm/proxy/guardrails/guardrail_hooks/typesafe/typesafe.py
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

Comment thread litellm/router_strategy/complexity_router/README.md
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.

# LiteLLM still supports 3.10, where they are distinct exception classes.
if isinstance(exc, (TimeoutError, asyncio.TimeoutError)):
return True
return type(exc).__name__.endswith("TimeoutError")

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.

Jev timeouts skip the circuit breaker

High Severity

Jev classifier HTTP timeouts do not open the circuit breaker. HttpJevClassifierClient.evaluate uses the shared HTTP client's timeout, so a timed-out call raises httpx.TimeoutException (or ReadTimeout) through asyncio.wait_for instead of TimeoutError. _is_classifier_timeout only treats TimeoutError and names ending in TimeoutError as timeouts, so a closed breaker ignores the failure. Every later request then waits the full Jev timeout again, which is the outage the breaker is meant to stop.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a392f7b. Configure here.

Comment thread litellm/proxy/management_helpers/auto_router_permissions.py
Comment thread litellm/proxy/auth/team_grants.py
Comment thread litellm/proxy/auth/auth_checks.py
… to stable/1.100.x

Bugbot on #42668 flagged that the backport's picks left the member
auto-router management path unwired on this line. This ports the pieces
that make it work, mirroring main: the member write slot in
model_management_endpoints (FOR UPDATE lock, team reload with the model
table include, identity and name-collision checks, post-commit config
publish), StoredAutoRouterIdentity wiring, the license feature helpers,
team tpd_limit, Router.config_deployments, the member_auto_router
ModelInfo flag, the _TEAM_GRANT_RELATIONS include on team lookups, and
the UserAPIKeyAuth fields the team_grants unpack needs. Test files were
rebuilt as line content plus the picks' own additions, and
ui_sso/test_team_grants carry the pick's grant assertions.

Gate-clearing edits stay local to what the picks added: prisma TypedDict
arguments replace mutable dict literals, remaining dict/mapping
arguments carry reasoned mutable-ok comments, test-quality-ok comments
mark the picks' internal-seam patches, and the regenerated dashboard api
types are staged. The only remaining make check failure is pre-existing
staging drift in untouched tests/test_litellm/test_router.py:2969.
…tpd_limit

The merged TestTeamMemberAutoRouterWrites class dropped the parametrize
decorator on test_admin_router_changes_release_member_scope, leaving the
test with an unsatisfiable endpoint fixture; this restores main's
patch/legacy x config/strategy/unrelated matrix. _full_team now sets
tpd_limit so the every-team-field grant coverage assertion sees the new
LiteLLM_VerificationTokenView field populated.
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

Comment thread litellm/proxy/management_endpoints/model_management_endpoints.py
…stable/1.100.x

Greptile flagged that the member create path committed the router row inside the write slot and then failed on the endpoint-level authorization in team_model_add, leaving the router orphaned. Port append_team_models from main into team_endpoints and call it directly like main does, and widen the grant/view plumbing and write payload calls so the LIT001 and LIT002 gates stay within their ceilings.
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread litellm/proxy/management_endpoints/model_management_endpoints.py Outdated
Comment thread litellm/proxy/management_endpoints/model_management_endpoints.py Outdated
Comment thread litellm/proxy/management_endpoints/model_management_endpoints.py Outdated
Bugbot flagged that the member create path ran its name-collision check without any lock, so two concurrent creates of the same name could both pass. Take the same pg_advisory_xact_lock main takes at the top of the write transaction so member writes serialize before the checks run.
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

Stale Bugbot comment from a previous run.



AUTO_ROUTER_WRITE_SLOT_LOCK_KEY: Final = 5_872_301
_WRITE_SLOT_LOCK_SQL: Final = "SELECT 1 AS locked FROM pg_advisory_xact_lock($1)"

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.

Invalid advisory lock SQL statement

High Severity

_WRITE_SLOT_LOCK_SQL calls pg_advisory_xact_lock in the FROM clause. That function returns void, so Postgres rejects it and every member auto-router write fails at lock acquisition. Other query_raw lock sites invoke the function in the select list instead.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e39e1c8. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pg_advisory_xact_lock in FROM runs fine on Postgres (void functions yield one row); verified on the QA database. This statement is identical to main.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

…e/1.100.x

This reverts commits 54b42e3, 4864227, 77915d4 and e39e1c8. Jev does not use the member auto-router write path and no other stable line ships it, so dropping the port leaves 1.100.x matching stable/1.101.x and stable/1.102.x

The classifier circuit breaker's litellm Timeout detection that 54b42e3 carried is kept, since main and the other lines have it

This reverts commit e39e1c8.
This reverts commit 77915d4.
This reverts commit 4864227.
This reverts commit 54b42e3.
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 55d1597. Configure here.

This branch has not been deployed

No deployments
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.

7 participants