Skip to content

[codex] Add inference policy trace metadata#8

Draft
realadeel wants to merge 1 commit into
mainfrom
codex/inference-policy-trace
Draft

[codex] Add inference policy trace metadata#8
realadeel wants to merge 1 commit into
mainfrom
codex/inference-policy-trace

Conversation

@realadeel
Copy link
Copy Markdown
Owner

Summary

Makes inference routing policy-mediated and observable.

The router now checks policy-engine for inference.local or inference.cloud before executing a selected backend, emits policy decision audit events, and attaches a structured trace with route reasons, usage, latency, and configurable cost estimates.

Impact

  • Adds policy checks for selected inference backends.
  • Falls back from cloud to local when cloud policy denies and a local model is available.
  • Blocks local-to-cloud fallback when cloud policy denies.
  • Adds request ids, policy decisions, route decisions, token usage, latency, and cost estimate fields to inference results.
  • Extends inference dashboard stats with policy denials and cloud cost counters.

Validation

  • python -m pytest tests/ -q -> 117 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