Skip to content

feat(router): add image policy presets#38

Closed
typelicious wants to merge 1 commit into
mainfrom
codex/feature/image-policy-presets-2026-03-12
Closed

feat(router): add image policy presets#38
typelicious wants to merge 1 commit into
mainfrom
codex/feature/image-policy-presets-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
  • add config and routing tests for policy-tag normalization and precedence

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

  • PYTHONPYCACHEPREFIX="$PWD/.pycache" python3 -m compileall foundrygate tests
  • PYTHONPATH=. ./.venv-check-313/bin/pytest -q
  • ./.venv-check-313/bin/ruff check .
  • ./.venv-check-313/bin/ruff format --check .
  • /usr/bin/git diff --check

@typelicious typelicious deleted the codex/feature/image-policy-presets-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