Skip to content

Keep the dgemma request's redirects manual - #126

Merged
myxamediyar merged 1 commit into
mainfrom
dgemma-redirect-manual
Sep 23, 2026
Merged

myxamediyar merged 1 commit into
mainfrom
dgemma-redirect-manual

Conversation

@myxamediyar

Copy link
Copy Markdown
Owner

What

  • The request to the image-capable service used redirect: "error". The Workers runtime has no such mode and throws a TypeError on the option, so in production every dgemma request failed before leaving the Worker and the route answered 503 dgemma_unavailable. The unit tests run under bun, which accepts the option, so they did not catch it.
  • The request now uses redirect: "manual": a 3xx comes back as a response and is answered as an outage, which is what the runtime's own error message recommends. Nothing is ever followed.
  • A test pins the option on the outgoing request and the 3xx mapping.

Checks

  • npx tsc --noEmit clean; test/dgemma.test.ts 8 pass.

🤖 Generated with Claude Code

The Workers runtime has no redirect "error" mode and throws on the option,
so every request to the image-capable service failed before it was sent and
the route answered dgemma_unavailable. Redirects are now "manual": a 3xx
comes back as a response and is answered as an outage, which is what the
runtime's own message recommends. A test pins the option and the mapping.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 51a6008b-935f-4752-bd04-275bbd0be4c5

📥 Commits

Reviewing files that changed from the base of the PR and between e7f8181 and 8c60a1b.

📒 Files selected for processing (2)
  • src/dgemma.ts
  • test/dgemma.test.ts

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.

@myxamediyar
myxamediyar merged commit 7282a85 into main Sep 23, 2026
2 checks passed
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