Skip to content

feat(python): expose Runner target requirements - #1206

Draft
afourniernv wants to merge 4 commits into
mainfrom
codex/target-eligibility-python
Draft

afourniernv wants to merge 4 commits into
mainfrom
codex/target-eligibility-python

Conversation

@afourniernv

@afourniernv afourniernv commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What

Let a Python host pass trusted labels into Runner:

runner = Runner.from_toml(source)
outcome = await runner.decide(
    request,
    required_labels=["private", "customer_data"],
    task_id=trusted_task_id,
)

Runner checks the labels before routing. Omitted labels differ from []; neither clears retained task requirements. The result includes approved candidates and their request settings.

Who makes the model calls?

Switchyard's TOML-configured clients make routing-time judge and Decision calls. The Python host makes the final answer calls, resolving returned target names to its deployments and keeping fallbacks within the approved candidates.

This draft does not accept host client callbacks. It is not the client-free factory proposal or a finished gateway integration.

Part of #1164. Based on #931; independent of #1205.

Tests

Fresh wheel: 188 Python tests passed, including four Runner tests. Strict Clippy, Ruff, mypy and formatting passed. No live provider calls during this refresh.

@afourniernv
afourniernv force-pushed the codex/privacy-task-retention branch from bb0a01b to ff210e6 Compare November 3, 2026 21:05
@afourniernv
afourniernv force-pushed the codex/target-eligibility-python branch from 7ce4ec8 to b3904f0 Compare November 3, 2026 21:05
@afourniernv
afourniernv force-pushed the codex/privacy-task-retention branch 2 times, most recently from f8dbd94 to 5d80ae5 Compare November 5, 2026 19:47
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
Signed-off-by: Alex Fournier <afournier@nvidia.com>
@afourniernv
afourniernv force-pushed the codex/target-eligibility-python branch from b3904f0 to 3ad0d77 Compare November 5, 2026 20:25
@afourniernv
afourniernv force-pushed the codex/privacy-task-retention branch 2 times, most recently from f695207 to 51f2587 Compare November 6, 2026 00:08
Base automatically changed from codex/privacy-task-retention to main November 6, 2026 00:32

This branch has not been deployed

No deployments
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