Skip to content

feat: absorb caozhiyuan/copilot-api upstream changes#1

Merged
BlueSkyXN merged 2 commits intomasterfrom
copilot/absorb-changes-from-caozhiyuan-repo
Mar 30, 2026
Merged

feat: absorb caozhiyuan/copilot-api upstream changes#1
BlueSkyXN merged 2 commits intomasterfrom
copilot/absorb-changes-from-caozhiyuan-repo

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 30, 2026

Absorbs all new features and refactors from caozhiyuan/copilot-api (2025-10 → 2026-03) that diverged after the last merge. BlueSkyXN-specific customizations (APP_NAME branding, --all-agent flag) are preserved.

New endpoints

  • /v1/responses — OpenAI Responses API with streaming support
  • /:provider/v1/messages + /:provider/v1/models — multi-provider Anthropic proxy routes

New infrastructure

  • src/lib/config.ts — JSON AppConfig (model settings, extra prompts, provider configs, context management, etc.)
  • src/lib/logger.ts — structured request/response logger
  • src/lib/models.ts — model registry and normalization
  • src/lib/trace.ts — trace-ID middleware
  • src/lib/request-auth.ts / request-context.ts — per-request auth and context
  • src/services/copilot/create-messages.ts — native Copilot /v1/messages service
  • src/services/copilot/create-responses.ts — Responses API service
  • src/services/providers/anthropic-proxy.ts — Anthropic provider proxy
  • src/routes/messages/subagent-marker.ts__SUBAGENT_MARKER__ / x-session-id propagation

Routing improvements

  • Claude-family models prefer Copilot's native /v1/messages over chat completions, enabling interleaved-thinking, advanced-tool-use, and context-management betas
  • Phase-aware gpt-5.4 / gpt-5.3-codex commentary before tool calls
  • GPT context compaction via responsesApiContextManagementModels
  • Tool-less warmup requests routed to smallModel to avoid wasting premium quota

CLI / auth additions

  • --enterprise-url / COPILOT_API_ENTERPRISE_URL for GHE.com
  • --oauth-app=opencode / COPILOT_API_OAUTH_APP
  • --api-home / COPILOT_API_HOME for custom data directory

Other upstream fixes

  • HTTP 429 retry headers forwarded to callers
  • Tool schema properties normalization for OpenAI API
  • User ID parsing with JSON + legacy fallback
  • Machine ID caching; VSCode session refresh
  • Accurate Claude token counting via Anthropic's free endpoint

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/repos/caozhiyuan/copilot-api/commits
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)
  • https://api.github.com/repos/caozhiyuan/copilot-api/contents/src/lib
    • Triggering command: /usr/bin/curl curl -sL REDACTED (http block)
  • https://api.github.com/repos/caozhiyuan/copilot-api/contents/src/routes
    • Triggering command: /usr/bin/curl curl -sL REDACTED (http block)
  • https://api.github.com/repos/caozhiyuan/copilot-api/contents/src/services
    • Triggering command: /usr/bin/curl curl -sL REDACTED (http block)

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

Copilot AI changed the title [WIP] Update repository with changes from caoziyuan/copilot-api feat: absorb caozhiyuan/copilot-api upstream changes Mar 30, 2026
Copilot AI requested a review from BlueSkyXN March 30, 2026 12:19
@BlueSkyXN BlueSkyXN marked this pull request as ready for review March 30, 2026 12:32
@BlueSkyXN BlueSkyXN merged commit 86b30d6 into master Mar 30, 2026
1 check failed
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.

2 participants