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: brent-weatherall/opencode-commandcode-provider
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: danielxxomg/opencode-commandcode-provider
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.
  • 7 commits
  • 22 files changed
  • 2 contributors

Commits on Jul 2, 2026

  1. feat(model): add retry/backoff with error classification and reconnect

    Replace naive exponential backoff with production-grade retry engine:
    
    - Error classification: 18 non-retryable patterns (auth/quota/validation)
      and 24 retryable patterns (network/server/timeout) via extractMessage()
      that handles Error, string, and SSE plain-object shapes
    - Fixed backoff schedule [1s, 2.5s, 5s] with ±25% jitter replaces
      unbounded exponential 2^n growth
    - fetchWithRetry: retries 5xx/429 with backoff, fails fast on 4xx
    - fetchOnce: single fetch for mid-stream reconnects (no double counting)
    - streamWithReconnect: emittedContent tracking gates reconnect to prevent
      duplicate content generation; pendingReconnect state machine handles
      clean reconnection flow
    - shouldRetry: centralized decision — checks aborted, emittedContent,
      attempt count, and error classification
    - buildHttpError: parses JSON error bodies with model ID annotation
    - partialOutputError: clear error when reconnect is unsafe
    - wrapAsError: normalizes any error shape into Error with ccError/code
    danielxxomg committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    468ebd9 View commit details
    Browse the repository at this point in the history
  2. fix(stream): terminate stream on SSE errors via controller.error()

    SSE error events were silently enqueued as stream parts ({type:"error"})
    which the AI SDK treats as ignorable — failures went undetected and the
    retry layer never saw them.
    
    Changes:
    - Add wrapError() to normalize SSE error objects, strings, and Error
      instances into real Error with ccError and code properties
    - toStreamPart("error") now returns null (errors handled at parse level)
    - parseStreamEvents: SSE error events call controller.error(wrapError(...))
      instead of controller.enqueue({type:"error"})
    - Network read failures in catch block also use controller.error(wrapError(...))
    - SSE errors in final buffer chunks also terminate via controller.error()
    
    This ensures the retry layer in model.ts sees real Error objects it can
    classify (retryable vs non-retryable) and the AI SDK surfaces failures
    to users instead of silently swallowing them.
    danielxxomg committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    889e368 View commit details
    Browse the repository at this point in the history
  3. fix(tests): mock filesystem in auth tests to isolate from real enviro…

    …nment
    
    Tests that expect 'no key found' behavior were failing when
    ~/.commandcode/auth.json exists in the test environment.
    
    Mock fs.existsSync to return false for auth file paths
    (.commandcode, .pi) while preserving real fs for other paths.
    Uses mock.module() with dynamic import so the mock is applied
    before auth.ts loads.
    danielxxomg committed Jul 2, 2026
    Configuration menu
    Copy the full SHA
    6dba780 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2026

  1. docs: update README with fork install instructions and retry/backoff …

    …features
    
    - Point to danielxxomg fork repo
    - Document retry/backoff, SSE error handling, partial output safety
    - Update package.json repo URL and bump version to 0.4.1
    - Add local file:// install instructions
    danielxxomg committed Jul 9, 2026
    Configuration menu
    Copy the full SHA
    5e80e80 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2026

  1. feat: add full OpenCode model schema (capabilities, vision, PDF, reas…

    …oning variants) for all 50 Command Code models
    danielxxomg committed Jul 28, 2026
    Configuration menu
    Copy the full SHA
    0bcd596 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2026

  1. Configuration menu
    Copy the full SHA
    eaca63c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c42a0ea View commit details
    Browse the repository at this point in the history
Loading