Skip to content

Add E2E test for session.providerEndpoint.get#1621

Draft
SteveSandersonMS wants to merge 5 commits into
mainfrom
stevesandersonms/provider-endpoint-e2e
Draft

Add E2E test for session.providerEndpoint.get#1621
SteveSandersonMS wants to merge 5 commits into
mainfrom
stevesandersonms/provider-endpoint-e2e

Conversation

@SteveSandersonMS

@SteveSandersonMS SteveSandersonMS commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Adds a Node E2E test for the new session.providerEndpoint.get shared API (not yet shipped).

The new RPC returns the provider endpoint + credentials for a session — the BYOK config if one is set, otherwise the resolved CAPI endpoint — so SDK consumers can call the LLM backend directly with their own OpenAI/Anthropic client.

Changes

  • Regenerated nodejs/src/generated/rpc.ts and session-events.ts against the runtime schema that adds providerEndpoint.
  • New nodejs/test/e2e/provider_endpoint.e2e.test.ts covering:
    • BYOK: returns protocol, baseUrl, apiKey, headers from the configured provider.
    • CAPI: returns the resolved CAPI base URL (using the harness CapiProxy so no real network calls).

Validating

Built the runtime branch locally and pointed the harness at it:

COPILOT_CLI_PATH=<runtime>\dist-cli\index.js npm run test:e2e -- provider_endpoint

Both tests pass.

Draft because this depends on the runtime PR landing + a release that includes the new schema before it can run in CI.

@github-actions

This comment has been minimized.

@SteveSandersonMS SteveSandersonMS force-pushed the stevesandersonms/provider-endpoint-e2e branch 2 times, most recently from c310f9d to 9d87a1e Compare June 10, 2026 14:32
Validates the new shared API exposed by copilot-agent-runtime (see
github/copilot-sdk-internal#133) end-to-end from the Node SDK. Covers
both BYOK (returns provider config + headers) and CAPI (returns the
resolved CAPI base URL).

Regenerates rpc.ts and session-events.ts against the runtime schema that
adds the providerEndpoint RPC.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@SteveSandersonMS SteveSandersonMS force-pushed the stevesandersonms/provider-endpoint-e2e branch from 9d87a1e to d0916b9 Compare June 10, 2026 14:36
@github-actions

This comment has been minimized.

SteveSandersonMS and others added 2 commits June 11, 2026 12:18
Runtime renamed session.providerEndpoint.get -> session.provider.getEndpoint
and split the wire protocol into separate type+wireApi fields. Regenerated
rpc.ts/session-events.ts against the runtime schema and updated the test
assertions to match. Both BYOK and CAPI cases pass against the real harness
CapiProxy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The API is gated by env var, so set it on the harness env object (which is
the same one passed to the CLI subprocess) instead of requiring callers to
export it in their own environment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

The runtime now surfaces Authorization in the headers map (consistent
with BYOK pass-through) rather than stripping it. Update the e2e to
assert the new contract and regen the RPC bindings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review

Summary: This draft PR regenerates Node.js types from an updated runtime schema and adds E2E tests for the new session.provider.getEndpoint RPC. Since it's draft and depends on a not-yet-shipped runtime release, the incomplete multi-SDK coverage is expected — but flagging the gaps here so nothing is missed before merge.


🔴 New provider RPC namespace — missing from all other SDKs

The regenerated nodejs/src/generated/rpc.ts adds a new provider namespace to the session RPC object (around line 14022):

session.rpc.provider.getEndpoint(params?)  // → "session.provider.getEndpoint"

The equivalent needs to be added (via generated-type regeneration) to all five other SDK implementations before this can be considered fully consistent:

SDK Location What needs to be added
Python python/copilot/generated/rpc.py session.rpc.provider.get_endpoint()
Go go/rpc/zrpc.go session.RPC.Provider.GetEndpoint() (new ProviderAPI field in SessionRPC)
.NET dotnet/src/Generated/Rpc.cs session.Rpc.Provider.GetEndpointAsync() (new ProviderApi property in SessionRpc)
Java java/src/generated/java/ session.rpc().provider().getEndpoint()
Rust rust/src/generated/rpc.rs session.rpc.provider.get_endpoint()

🟡 New/renamed generated types — not yet in other SDKs

The schema regeneration brings several other type additions/renames that are currently Node.js-only:

New types:

  • ProviderEndpoint, ProviderEndpointType, ProviderEndpointWireApi, ProviderSessionToken, ProviderGetEndpointRequest
  • AgentsDiscoverRequest, InstructionsDiscoverRequest
  • MemoryConfiguration
  • ServerAgentList, ServerInstructionSourceList
  • AssistantMessageServerTools

Renames (breaking for any consumers relying on the old names):

  • InstructionsSourcesInstructionSource
  • InstructionsSourcesTypeInstructionSourceType
  • InstructionsSourcesLocationInstructionSourceLocation

Modified shapes:

  • ScheduleEntry.intervalMs is now optional; cron, tz, and at fields added (one-shot and calendar schedules)
  • SlashCommandInfo gains schedulable?: boolean
  • InstructionSource gains projectPath?: string
  • ResumeData / ShutdownData gain eventsFileSizeBytes?: number
  • HookProgressData gains temporary?: boolean

All of these will need to be propagated to Python, Go, .NET, Java, and Rust generated files (via the normal codegen regeneration step for each SDK) before the schema is fully in sync.


Minor nit: PR title vs RPC method name

The PR title and description reference session.providerEndpoint.get, but the actual wire name and TypeScript accessor path are session.provider.getEndpoint. Worth aligning the PR description to avoid confusion.


As a draft PR this is all expected — just flagging as a pre-merge checklist so nothing slips through when the runtime ships and this gets un-drafted.

Generated by SDK Consistency Review Agent for issue #1621 · sonnet46 3.1M ·

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