Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wbf57300-code/copilot2api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: whtsky/copilot2api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 11 commits
  • 33 files changed
  • 3 contributors

Commits on Apr 5, 2026

  1. Configuration menu
    Copy the full SHA
    8e32c4d View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2026

  1. fix: keep anthropic thinking signatures on the same block (whtsky#5)

    Attach reasoning signatures to the currently open thinking block
    before closing it, instead of emitting a separate thinking block.
    Also preserve reasoning_opaque on finish and add regression tests
    for thinking->finish and thinking->tool-call flows.
    whtsky authored Apr 16, 2026
    Configuration menu
    Copy the full SHA
    9e77bcc View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2026

  1. chore: release v0.3.1

    Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
    whtsky and claude committed Apr 26, 2026
    Configuration menu
    Copy the full SHA
    7368d6b View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2026

  1. feat: add amp search and page extraction endpoints (whtsky#6)

    * feat: add amp search and page extraction endpoints
    
    Handle webSearch2 locally via Copilot Responses API with web_search
    tool (gpt-5-mini), and extractWebPageContent via Jina Reader, so amp
    CLI web search works without a paid ampcode.com account.
    
    Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
    
    * feat: auto-upgrade models to best available variant
    
    When the upstream model list contains a better variant (e.g.
    claude-opus-4.7-1m-internal), automatically use it instead of the base
    model. This enables features like effort: high that are only supported
    by extended variants.
    
    Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
    
    * refactor: replace context-1m header detection with model auto-upgrade
    
    The auto-upgrade logic already promotes models to -1m/-1m-internal
    variants, making the explicit anthropic-beta header detection redundant.
    
    Add COPILOT2API_NO_MODEL_UPGRADE env var to opt out of auto-upgrade.
    Update README to document auto-upgrade behavior.
    
    Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
    
    * fix: native passthrough uses upgraded model instead of alias-resolved model
    
    The normalizeNativeMessagesBody was receiving the alias-resolved model
    (e.g. claude-opus-4.7) instead of the auto-upgraded model
    (e.g. claude-opus-4.7-1m-internal), causing upstream to reject requests
    with unsupported effort/thinking values for the non-upgraded model.
    
    Also adds debug logging for upstream request/response bodies.
    
    * perf: guard upstream request debug log with level check
    
    * refactor: pass debug flag to upstream client, avoid per-request level check
    
    * feat: add amp local mode — serve thread management APIs locally
    
    Amp local mode is always enabled. Thread management (upload, get, list,
    search, delete, meta merge), telemetry, user info, and other management
    APIs are served from local ~/.local/share/amp/threads/ instead of
    proxying to ampcode.com. Unhandled /api/ routes still fall through to
    the ampcode.com reverse proxy.
    
    Endpoints:
    - GET  /api/threads/find — full-text search across local threads
    - GET  /api/threads/{id}.md — render thread as markdown
    - POST /api/internal — uploadThread, setThreadMeta, deleteThread,
      getThread, listThreads, getUserInfo, and 15+ other method stubs
    - POST /api/telemetry — no-op
    - POST /api/durable-thread-workers/{id} — stub
    - GET  /api/users/{id}, /api/attachments, /news.rss — stubs
    
    Supports gzip-compressed request bodies and params-wrapped payloads.
    
    ---------
    
    Co-authored-by: Claude Opus 4 <noreply@anthropic.com>
    whtsky and claude authored Jun 25, 2026
    Configuration menu
    Copy the full SHA
    6f32582 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2026

  1. feat: copilot options API — drop -1m upgrade hack, forward reasoning_…

    …effort verbatim (whtsky#7)
    
    * refactor!: remove model auto-upgrade logic
    
    The upgradeModel() helper rewrote base Claude model ids (e.g.
    claude-opus-4.7) to extended variants like -1m-internal / -1m when
    they appeared in the upstream /models list. The modern Copilot model
    catalog no longer ships those suffixed ids — base models carry the
    full context window directly via capabilities.limits — so the rewrite
    is solving a problem that no longer exists and was hiding the actual
    model id from callers.
    
    Removes the helper, the COPILOT2API_NO_MODEL_UPGRADE env var, the
    noModelUpgrade flag threaded through NewHandler, the related tests,
    and the README/CHANGELOG references.
    
    BREAKING CHANGE: requests for a base model id are no longer silently
    rewritten. Pass the variant id explicitly (e.g. claude-opus-4.6-1m on
    older accounts that still expose it) if you want a different model.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    
    * feat: forward reasoning_effort and output_config.effort verbatim
    
    Copilot's modern /models listing declares per-model accepted effort
    values in capabilities.supports.reasoning_effort (e.g. xhigh on GPT-5,
    minimal on Gemini Flash, max on Anthropic). The previous request
    plumbing only knew the legacy thinking_budget numeric and bucketed it
    into low|medium|high at 8k/16k thresholds, so modern enum values were
    either dropped or flattened.
    
    - Add ReasoningEffort *string to OpenAIChatCompletionsRequest. Accept
      any string and forward to upstream; per-model validation is
      upstream's job (the supported enum varies per model).
    - Both proxy smart-route converters now forward the effort string
      directly instead of round-tripping through ThinkingBudget. Legacy
      thinking_budget remains as a fallback when no effort is supplied.
    - Anthropic→OpenAI bridge (ConvertAnthropicToOpenAI) now honors
      output_config.effort with priority over thinking.budget_tokens.
    - Stop flattening output_config.effort: "max" → "high" in the
      Responses path. max (and xhigh) are first-class effort values per
      the current Anthropic SDK and Copilot model capabilities.
    
    Verified end-to-end against the live Copilot upstream: pre-fix
    smart-routed bodies for gpt-5.5 with reasoning_effort low/high/xhigh
    were identical (field dropped); post-fix the upstream body contains
    reasoning: {effort, summary: "detailed"} and completion tokens scale
    197→248→276 with effort.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    
    ---------
    
    Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    whtsky and claude authored Jun 26, 2026
    Configuration menu
    Copy the full SHA
    25e660e View commit details
    Browse the repository at this point in the history
  2. chore: release v0.4.0

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    whtsky and claude committed Jun 26, 2026
    Configuration menu
    Copy the full SHA
    ea230ca View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2026

  1. Configuration menu
    Copy the full SHA
    bfa4fc1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8bc499c View commit details
    Browse the repository at this point in the history
  3. chore: release v0.5.0

    whtsky committed Jul 25, 2026
    Configuration menu
    Copy the full SHA
    9db2d07 View commit details
    Browse the repository at this point in the history
  4. fix: scope context tier injection to openai endpoints (whtsky#8)

    Merge endpoint-aware contextTier injection fix.
    whtsky-playground authored Jul 25, 2026
    Configuration menu
    Copy the full SHA
    02c004a View commit details
    Browse the repository at this point in the history
  5. chore: release v0.5.1

    whtsky committed Jul 25, 2026
    Configuration menu
    Copy the full SHA
    2c7edf0 View commit details
    Browse the repository at this point in the history
Loading