Skip to content

Fix the Jev gateway path so the shadow gate actually calls the model - #345

Merged
anuveyatsu merged 1 commit into
mainfrom
bead/jev-path-fix
Sep 30, 2026
Merged

anuveyatsu merged 1 commit into
mainfrom
bead/jev-path-fix

Conversation

@anuveyatsu

@anuveyatsu anuveyatsu commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Follow-up to ADR-0029. The shipped provider path /workers-ai/typesafe/jev 400s at the gateway (maps to /ai/typesafe/jev, missing run), so the shadow acceptance gate was a silent no-op.

A live probe found the working path and confirmed the cell's AI Gateway token is sufficient — no TypeSafe API key needed:

POST <gateway>/workers-ai/run/typesafe/jev
→ 200 {"result":{"model":"jev-1.13.0","answers":{"done":{"noul":0.94}},"usage":{...}}}

One-line fix to DefaultProviderPath; the tolerant parser already handles that envelope. Adds a test pinned to the exact live response.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the Workers AI JEV endpoint path used by the gateway. Requests now target /workers-ai/run/typesafe/jev.
    • Improved handling of completed responses that include a typed answer and usage information.

The shipped path (/workers-ai/typesafe/jev) 400s at the gateway -- it maps to
/accounts/<acct>/ai/typesafe/jev, missing the run segment -- so the shadow gate
was a silent no-op. A live probe found the working path and confirmed the cell's
AI Gateway token is sufficient (no TypeSafe key):

  POST <gateway>/workers-ai/run/typesafe/jev
  -> 200 {"result":{"model":"jev-1.13.0","answers":{"done":{"noul":0.94}},"usage":{...}}}

The tolerant parser already handles that envelope; only the path constant was
wrong. Adds a test pinned to the exact live envelope.

Command run:
  gofmt -l internal/jev/ && go test ./internal/jev/
Output:
  ok  github.com/datopian/openbases/internal/jev  0.369s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e5dfe3d7-36d6-49a0-8f9a-85d62008aba4

📥 Commits

Reviewing files that changed from the base of the PR and between af569ac and 8b6157e.

📒 Files selected for processing (2)
  • internal/jev/jev.go
  • internal/jev/jev_test.go
 ________________________________________________________________________________________________________________________________
< Some things are better done than described. Don't fall into the specification spiral - at some point you need to start coding. >
 --------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@anuveyatsu
anuveyatsu merged commit 3fa53b9 into main Sep 30, 2026
6 of 7 checks passed
@anuveyatsu
anuveyatsu deleted the bead/jev-path-fix branch September 30, 2026 07:33
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