Add E2E test for session.providerEndpoint.get#1621
Conversation
This comment has been minimized.
This comment has been minimized.
c310f9d to
9d87a1e
Compare
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>
9d87a1e to
d0916b9
Compare
This comment has been minimized.
This comment has been minimized.
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>
This comment has been minimized.
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>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cross-SDK Consistency ReviewSummary: This draft PR regenerates Node.js types from an updated runtime schema and adds E2E tests for the new 🔴 New
|
| 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,ProviderGetEndpointRequestAgentsDiscoverRequest,InstructionsDiscoverRequestMemoryConfigurationServerAgentList,ServerInstructionSourceListAssistantMessageServerTools
Renames (breaking for any consumers relying on the old names):
InstructionsSources→InstructionSourceInstructionsSourcesType→InstructionSourceTypeInstructionsSourcesLocation→InstructionSourceLocation
Modified shapes:
ScheduleEntry.intervalMsis now optional;cron,tz, andatfields added (one-shot and calendar schedules)SlashCommandInfogainsschedulable?: booleanInstructionSourcegainsprojectPath?: stringResumeData/ShutdownDatagaineventsFileSizeBytes?: numberHookProgressDatagainstemporary?: 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 · ◷
Adds a Node E2E test for the new
session.providerEndpoint.getshared 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
nodejs/src/generated/rpc.tsandsession-events.tsagainst the runtime schema that addsproviderEndpoint.nodejs/test/e2e/provider_endpoint.e2e.test.tscovering:protocol,baseUrl,apiKey,headersfrom the configured provider.CapiProxyso no real network calls).Validating
Built the runtime branch locally and pointed the harness at it:
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.