Skip to content

Split engine provider selection from harness execution and route Claude/Codex via reflected CAPI endpoints#45490

Draft
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/split-agentic-engine
Draft

Split engine provider selection from harness execution and route Claude/Codex via reflected CAPI endpoints#45490
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/split-agentic-engine

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This change separates inference-provider concerns from harness-runner concerns in the agentic engine flow, enabling Claude Code and Codex to run against GitHub Copilot CAPI-backed endpoints discovered at runtime. It also introduces explicit provider override semantics so workflows can select provider behavior without coupling to a specific harness implementation.

  • Provider override semantics (engine.provider)

    • Added engine.provider parsing as a first-class provider override for non-inline engines, while preserving existing engine.model-provider compatibility.
    • Kept inline engine.runtime + engine.provider object behavior intact (id/auth/request path).
  • Engine abstraction split (provider vs harness)

    • Introduced explicit inference-provider and harness-runner interfaces (with compatibility aliases) to decouple model-provider resolution from CLI harness execution mechanics.
    • Clarified intent in engine abstractions and call sites where harness capability is optional.
  • Known provider normalization

    • Consolidated provider alias normalization around known providers (github, anthropic, openai) and mapped GitHub aliases consistently (including github_models).
    • Ensures provider selection resolves predictably across parser/runtime paths.
  • Claude/Codex runtime endpoint routing from /reflect

    • Extended shared reflect utilities to resolve configured provider endpoints from AWF /reflect payloads.
    • Updated Claude harness to derive provider base URL from reflected endpoint data at runtime.
    • Updated Codex harness to derive and apply reflected endpoint routing by rewriting openai-proxy base_url and exporting corresponding env overrides.
  • Targeted test coverage updates

    • Added/updated parser and harness tests for:
      • engine.provider override behavior
      • provider-endpoint resolution from reflect data
      • Codex provider config rewrite/env wiring behavior
engine:
  id: claude
  provider: github   # runtime provider override (CAPI-backed endpoint selected from /reflect)
  model: claude-sonnet-4.6

Copilot AI and others added 2 commits July 14, 2026 13:13
…t routing

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ne.provider override

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Split engine harness/provider concerns and route Claude/Codex via /reflect endpoints Split engine provider selection from harness execution and route Claude/Codex via reflected CAPI endpoints Jul 14, 2026
Copilot AI requested a review from pelikhan July 14, 2026 13:28
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot add smoke-github-Claude that uses github to run Claude code

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot add smoke-github-Claude that uses github to run Claude code

Implemented in 57546cf: added smoke-github-claude and wired centralized slash-command routing so it runs Claude with GitHub provider (model-provider: github).

@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category feature
Risk 🔴 High
Score 70/100 (impact:35, urgency:18, quality:17)
Action fast_track

Splits engine provider selection from harness execution and routes Claude/Codex via reflected CAPI endpoints. High-impact architectural change: new smoke workflow, new Go/JS files. Needs careful review.

Generated by 🔧 PR Triage Agent · 171 AIC · ⌖ 7.66 AIC · ⊞ 5.6K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants