Skip to content

feat(sdk/python): expose provider-agnostic harness variants - #1024

Open
ddbaron wants to merge 1 commit into
Agent-Field:mainfrom
ddbaron:fm/agentfield-variants-upstream
Open

feat(sdk/python): expose provider-agnostic harness variants#1024
ddbaron wants to merge 1 commit into
Agent-Field:mainfrom
ddbaron:fm/agentfield-variants-upstream

Conversation

@ddbaron

@ddbaron ddbaron commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an optional provider-agnostic variant to HarnessConfig, HarnessRunner.run, and Agent.harness.
  • Preserve the configured variant while allowing a per-call value to override it.
  • Document that explicit variants take precedence over a #variant model suffix where the selected provider supports variants.
  • Keep provider-specific interpretation in each provider adapter; this change only exposes and forwards the public API value.

This change is independently applicable to main. The OpenCode configuration and recursion-isolation work is kept in the related OpenCode pull request rather than made a prerequisite here.

Validation

  • uv run --extra dev pytest -q tests/test_harness_agent_wiring.py tests/test_harness_runner.py tests/test_harness_types.py
  • Python compilation
  • git diff --check

The focused tests pass against the current main branch.

Related to the original proposal: #960

Related to, but independently applicable from, the OpenCode change: #1023

The fork preview remains available at ddbaron#4.

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focused Python harness tests passed locally for me, and the public variant plumbing looks clean. I also approved the fork-gated workflows so the full matrix is running now.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.0 KB - 0.30 µs -14%

✓ No regressions detected

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 87.80% 87.40% ↑ +0.40 pp 🟡
sdk-go 93.10% 92.00% ↑ +1.10 pp 🟢
sdk-python 94.72% 93.73% ↑ +0.99 pp 🟢
sdk-typescript 91.72% 90.42% ↑ +1.30 pp 🟢
web-ui 84.77% 84.79% ↓ -0.02 pp 🟡
aggregate 85.89% 85.75% ↑ +0.14 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 ➖ no changes
sdk-go 0 ➖ no changes
sdk-python 0 ➖ no changes
sdk-typescript 0 ➖ no changes
web-ui 0 ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@santoshkumarradha
santoshkumarradha added this pull request to the merge queue Sep 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 1, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member

This still looks good from my side, but #1023 landed first and this branch is now conflicting with current main. Please rebase on the latest main and rerun the checks, and once that is back green this should be good to go.

@santoshkumarradha

Copy link
Copy Markdown
Member

@ddbaron thanks for this ! @AbirAbbas lets enhance this with tsx and go support as well.

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.

2 participants