Skip to content

Port BYOK bearer token clarifications from upstream#89

Merged
brunoborges merged 3 commits intomainfrom
copilot/update-upstream-sdk-commit
Feb 8, 2026
Merged

Port BYOK bearer token clarifications from upstream#89
brunoborges merged 3 commits intomainfrom
copilot/update-upstream-sdk-commit

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Upstream commit 05e3c46 clarified that BYOK bearer tokens are static strings with no automatic refresh mechanism.

Changes

  • Documentation (advanced.md): Added bearer token authentication section with static token limitation note, identity constraints (no Entra ID/managed identities), and rationale for why token refresh callbacks aren't supported
  • Javadoc (ProviderConfig): Updated setBearerToken() to document static token behavior

Example

var session = client.createSession(
    new SessionConfig()
        .setProvider(new ProviderConfig()
            .setType("openai")
            .setBaseUrl("https://my-endpoint.example.com/v1")
            .setBearerToken(System.getenv("TOKEN")))  // Static - no auto-refresh
).get();

For expired tokens, create a new session with a fresh token. Long-running workloads requiring Entra authentication need custom token refresh logic.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/copilot_internal/user
    • Triggering command: /home/REDACTED/work/copilot-sdk-java/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot /home/REDACTED/work/copilot-sdk-java/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot --server --no-auto-update --log-level info --stdio --auth-token-env COPILOT_SDK_AUTH_TOKEN --no-auto-login (http block)
    • Triggering command: /home/REDACTED/work/copilot-sdk-java/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot /home/REDACTED/work/copilot-sdk-java/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot --server --no-auto-update --log-level info --stdio --auth-token-env COPILOT_SDK_AUTH_TOKEN --no-auto-login tive k-java/copilot-sdk-java (http block)
    • Triggering command: /home/REDACTED/work/copilot-sdk-java/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot /home/REDACTED/work/copilot-sdk-java/copilot-sdk-java/target/copilot-sdk/test/harness/node_modules/@github/copilot-linux-x64/copilot --server --no-auto-update --log-level info --stdio --auth-token-env COPILOT_SDK_AUTH_TOKEN --no-auto-login -Dlibrary.jansi.gh -Dmaven.multiModuleProjectDirect"tsx" server.ts git rev-�� --show-toplevel (http block)
  • https://api.github.com/repos/copilot-community-sdk/copilot-sdk-java/issues/89/labels
    • Triggering command: /usr/bin/curl curl -X POST -H Accept: application/vnd.github.v3+json -H Authorization: token REDACTED -d {"labels":["upstream-sync"]} e_modules/.bin/n--skip-tests git rev-�� ava/target/copilot-sdk/test/harness/node_modules/tsx/dist/preflight.cjs which t-sdk-java/target/copilot-sdk/test/harness/node_modules/tsx/dist/loader.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Upstream sync: 1 new commits (2026-02-08)</issue_title>
<issue_description>## Automated Upstream Sync

There are 1 new commits in the official Copilot SDK since the last merge.

Recent upstream commits

05e3c46 Clarify BYOK token usage and limitations (#402)

Instructions

Follow the agentic-merge-upstream prompt to port these changes to the Java SDK.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 8, 2026 01:28
Add bearer token authentication section and limitations to BYOK documentation.
Updates ProviderConfig Javadoc to clarify static token behavior.

From upstream commit: 05e3c46 (Clarify BYOK token usage and limitations)

Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
@brunoborges brunoborges marked this pull request as ready for review February 8, 2026 01:29
Copy link
Member

@brunoborges brunoborges left a comment

Choose a reason for hiding this comment

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

lgtm

Copilot AI changed the title [WIP] Sync Copilot SDK with upstream changes Port BYOK bearer token clarifications from upstream Feb 8, 2026
Copilot AI requested a review from brunoborges February 8, 2026 01:30
@brunoborges brunoborges merged commit 4c76247 into main Feb 8, 2026
2 checks passed
@brunoborges brunoborges deleted the copilot/update-upstream-sdk-commit branch February 16, 2026 15:43
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.

Upstream sync: 1 new commits (2026-02-08)

2 participants