Skip to content

feat(router): add image policy presets#39

Merged
typelicious merged 1 commit into
mainfrom
codex/feature/image-policy-presets-r2-2026-03-12
Mar 12, 2026
Merged

feat(router): add image policy presets#39
typelicious merged 1 commit into
mainfrom
codex/feature/image-policy-presets-r2-2026-03-12

Conversation

@typelicious
Copy link
Copy Markdown
Collaborator

What changed

  • add optional image.policy_tags to image-provider metadata
  • allow image requests to carry image-policy hints via metadata, form fields, or X-FoundryGate-Image-Policy
  • feed image-policy hints into modality-aware ranking so matching providers are preferred
  • expose image-policy details in image dry-run diagnostics and docs
  • rebase cleanly on top of the merged image workflow refinements from PR feat(api): refine image request validation #37

Why

Image routing now understands size and output fit, but operators still need a lightweight way to express intent such as quality, cost, batch, or editing without building a second policy layer.

How verified

  • PYTHONPATH=. ./.venv-check-313/bin/pytest -q tests/test_route_introspection.py tests/test_capabilities.py
  • ./.venv-check-313/bin/ruff check foundrygate/main.py foundrygate/router.py foundrygate/config.py tests/test_route_introspection.py tests/test_capabilities.py
  • /usr/bin/git diff --check

@typelicious typelicious merged commit f8ba9af into main Mar 12, 2026
12 checks passed
@typelicious typelicious deleted the codex/feature/image-policy-presets-r2-2026-03-12 branch March 12, 2026 16:22
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