Skip to content

feat(copilot): flat pi-style provider config, SDK args, ACP custom providers#1402

Draft
christso wants to merge 2 commits into
mainfrom
feat/copilot-openai-provider-support
Draft

feat(copilot): flat pi-style provider config, SDK args, ACP custom providers#1402
christso wants to merge 2 commits into
mainfrom
feat/copilot-openai-provider-support

Conversation

@christso

Copy link
Copy Markdown
Collaborator

Summary

Copilot targets now use the same flat provider configuration shape as pi-cli, so OpenAI-compatible gateways can be configured without wrapping base_url and credentials in same-week pre-release custom_provider or byok objects. The nested custom_provider/byok YAML surfaces were removed before release, while the internal resolved customProvider shape remains for CLI env construction and SDK session setup.

This also closes the evaluation gaps WTG hit when running Copilot against an OpenAI LLM gateway: SDK target args now pass through as cliArgs, custom providers stay in ACP mode so tool-call capture is preserved, ACP spawns resolve relative plugin paths from the eval workspace, and the SDK import diagnostic now names the vscode-jsonrpc/node vs node.js mismatch with a manual repair command.

Config Example

targets:
  - name: copilot-openai
    provider: copilot-cli
    subprovider: openai
    base_url: ${{ OPENAI_BASE_URL }}
    api_key: ${{ OPENAI_API_KEY }}
    api_version: ${{ OPENAI_API_VERSION }}
    wire_api: ${{ COPILOT_PROVIDER_WIRE_API }}
    args:
      - --plugin-dir
      - ./plugins

Notes

  • custom_provider: and byok: are no longer accepted target fields.
  • subprovider maps to the Copilot provider type.
  • base_url, api_key, bearer_token, api_version, and wire_api are resolved from the flat target object.
  • copilot-sdk keeps the internal customProvider resolved config and now forwards args to CopilotClient as cliArgs.
  • copilot-cli custom provider runs now use ACP mode instead of forced prompt mode.

Tests

  • bun run typecheck
  • bun run lint
  • bun --filter @agentv/core test test/evaluation/providers/copilot-cli.test.ts test/evaluation/providers/copilot-sdk.test.ts test/evaluation/providers/targets.test.ts test/evaluation/validation/targets-validator.test.ts — 101 pass, 0 fail
  • bun run verify

Post-Deploy Monitoring & Validation

No additional production monitoring required; this is local eval provider configuration and subprocess behavior. Validate by running a Copilot target against a flat OpenAI-compatible config and checking that COPILOT_PROVIDER_* env vars are present, ACP tool-call capture remains populated, and relative --plugin-dir paths resolve from the eval workspace.


Compound Engineering
Codex

…oviders

- Remove custom_provider/byok nested objects (same-week pre-release, converge to flat)
- Add flat subprovider/base_url/api_key/api_version/wire_api fields matching pi-cli style
- copilot-sdk: pass args field as cliArgs to CopilotClient
- copilot-cli: custom providers now run in ACP mode (preserves tool-call capture)
- copilot-cli ACP spawn: set cwd so --plugin-dir ./relative resolves from eval workspace
- Precise vscode-jsonrpc node vs node.js diagnostic in copilot-sdk
- Update docs, validator, and tests
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 48b76f1
Status: ✅  Deploy successful!
Preview URL: https://4585c635.agentv.pages.dev
Branch Preview URL: https://feat-copilot-openai-provider.agentv.pages.dev

View logs

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