#2952

feat(gateway): send S3, Cloud Storage and Azure image links to Base Labs decision models

OpenDanielButler1wants to merge intofrom

Base Labs' decision models (Elephant-1, Mammoth-1, Joey-1) can read images from a link, but Phaseo only accepted inline base64 images. Baseten fetches HTTPS image URLs hosted on Amazon S3, Google Cloud Storage and Azure Blob Storage. This PR lets callers send those links through Phaseo.

What changed

  • Public API: input_image.image_url on POST /v1/decisions accepts an https:// URL as well as a base64 data URL.
  • Routing: a request with a hosted image goes only to routes whose decisions.make capability sets image_urls: true. No route sets it until the Base Labs flag is turned on after deploy, so every other decision provider still only ever receives inline images.
  • Baseten adapter: hosted URLs are forwarded unchanged as state.messages image parts, but only for the hosts Baseten fetches: S3 (virtual-hosted, path-style and regional), storage.googleapis.com and *.blob.core.windows.net, over HTTPS on the default port. Any other host gets a local 400 with a clear message instead of an upstream 422.
  • Docs and SDK: the OpenAPI schema (pattern and description) and the decisions page are updated in 9 languages. The localized OpenAPI and the TS SDK doc comment are regenerated, translation freshness is recorded, and a changeset is added.

Why this shape

OptionDecision
Forward links to BasetenChosen. This matches Baseten's own rules and adds no outbound fetches or latency on our side.
Gateway fetches arbitrary hosts and inlines themNot done. That would mean outbound fetching and SSRF handling in the gateway; it's possible as a follow-up.
Legacy images fieldUnchanged: base64 data URLs only.

Before / after

RequestBeforeAfter
Base Labs model with an S3, Cloud Storage or Azure image URL400 validation_errorForwarded; Baseten fetches it
Base Labs model with any other host or http://400 validation_error400 unsupported_decision_request explaining the allowed hosts
Any other decision model with an image URL400 validation_errorNo eligible route (unchanged in effect)

Verification

  • Direct Baseten probes with Joey-1 returned 200 for Cloud Storage and S3 URLs (virtual-hosted, path-style and regional). A Hugging Face URL and an http:// URL both returned 422 "Remote images require an allowed HTTPS hostname on port 443".
  • vitest over the Baseten and shared decisions executors, pipeline/execute, the decisions schema and the decisions protocol: 566 passed. The 7 new tests fail on the old code.
  • tsc --noEmit in apps/api: clean.
  • Docs checks all pass: generate-localized-openapi --check, translation-freshness check, validate-locales and docs:public-safety.
  • pnpm openapi:gen changed only the TS SDK doc comment.
  • tests/openapi-contract-parity.test.ts fails identically on main (path/method pairs), so it is unrelated.

After deploy

  • Set params.image_urls = true on the three Base Labs decisions.make capabilities.
  • Run a live S3 URL request through the public API.

Proof: new tests fail on the old code and pass with the change, plus direct Baseten probes of the allowed and rejected hosts.

Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Activity

10
vercel[bot]9h ago

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated
phaseo ReadyPreviewOct 30, 2026 3:10pm UTC

chatgpt-codex-connector[bot]9h ago

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code Review✅ Completed 2026-10-30T14:36:49.693492Za0cb3caPR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

coderabbitai[bot]9h ago

WARNING

Review limit reached

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

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 68fe8d50-50df-47ad-b1f9-8c5a5a7b0038
Commits

Reviewing files that changed from the base of the PR and between 1a66d82704edfef24a910aa2d8ef445a5c0234ac and b8383fd83f6abccc41d40d5c1525793c8720794e.

Files selected for processing: 28
  • .changeset/decision-hosted-image-urls.md
  • apps/api/src/core/__tests__/schemas-decisions.test.ts
  • apps/api/src/core/decisions.ts
  • apps/api/src/executors/baseten/decisions/index.test.ts
  • apps/api/src/executors/baseten/decisions/index.ts
  • apps/api/src/pipeline/execute/decisions-capabilities.test.ts
  • apps/api/src/pipeline/execute/modalities.ts
  • apps/docs/ar/openapi/v1/openapi.localized.yaml
  • apps/docs/ar/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/de/openapi/v1/openapi.localized.yaml
  • apps/docs/de/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/es/openapi/v1/openapi.localized.yaml
  • apps/docs/es/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/fr/openapi/v1/openapi.localized.yaml
  • apps/docs/fr/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/hi/openapi/v1/openapi.localized.yaml
  • apps/docs/hi/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/ja/openapi/v1/openapi.localized.yaml
  • apps/docs/ja/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/openapi/localized-copy.json
  • apps/docs/openapi/v1/openapi.yaml
  • apps/docs/pt-BR/openapi/v1/openapi.localized.yaml
  • apps/docs/pt-BR/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/translation-status.json
  • apps/docs/v1/api-reference/endpoint/decisions.mdx
  • apps/docs/zh-Hans/openapi/v1/openapi.localized.yaml
  • apps/docs/zh-Hans/v1/api-reference/endpoint/decisions.mdx
  • packages/sdk/sdk-ts/src/oapi-gen/models/DecisionInputImage.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

github-actions[bot]9h ago

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None
github-advanced-security[bot]reviewed9h ago
github-advanced-security[bot]reviewed9h ago
DanielButler1reviewed9h ago
DanielButler1reviewed9h ago