镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat(core)!: require documented Provider API access (carry #164) - #203

Merged
pierreraby merged 1 commit into
mainfrom
carry/pr164-provider-only
Nov 5, 2026
Merged

pierreraby merged 1 commit into
mainfrom
carry/pr164-provider-only

Conversation

@pierreraby

Copy link
Copy Markdown
Collaborator

Attribution and scope

Carries #164 by Patrick Wozniak (@patlux), adapted to current main after #202. The commit preserves Patrick's co-author credit. The original PR remains separate.

Breaking inference policy

  • Require documented Provider API entitlement; remove the automatic /alpha/generate retry after 403 upgrade_required, including the retired client, converters, schema/transcript modules and generate-only fixtures/tests.
  • Keep entitled GOAT, Pro and Max inference through the native Chat Completions, Responses and Anthropic Messages adapters.
  • Keep internal read-only quota/account reporting and authentication/key validation as a documented exception; successful login/quota calls do not grant inference entitlement.
  • Preserve credentials, sessions, persisted endpoint choices, native pricing and real-host reasoning/tool/image/history behavior.
  • Report actionable denials without sticky lockout or stale/concurrent success status. Preserve response diagnostics, abort classification and redacted host errors.

Validation

Fresh local validation on this exact content:

  • Full npm test with Pi and OMP required: 430 Node tests, zero failures/cancellations/skips; Pi 1.5.0, OMP 18.16.0 and Bun 1.4.4.
  • All six host/protocol contracts and persistent endpoint routing, refresh, restart and backed-up repair pass.
  • Source typecheck and the dedicated entrypoint gate against real Pi declarations pass.
  • Formatting, actionlint, diff checks and dependency audit pass (zero audit vulnerabilities).
  • Public catalog is current at command-code@1.88.3; public pricing check passes without edits (95 advertised models checked).
  • The packed artifact contains 31 files and no retired generate modules. Its isolated installation passes both real-host suites, all six protocol contracts and endpoint-routing tests against loopback mocks.
  • Scratch negative controls detect denial suppression, request-ownership and error-redaction regressions, retired-client packaging and removal of the terminal-event guard. The new terminal regression drains through actual iterator completion, not the first terminal event.

Review and limits

An independent read-only deepseek/deepseek-flash review with thinking max returned OK with notes, with no P0/P1 finding. The small cleanup/coverage notes were addressed and revalidated by the author; the final cleanup delta was not independently re-reviewed.

Tests use synthetic credentials and mock upstreams, not paid/live plan probes. The editor LSP uses inferred settings for the entrypoint; the real-host compile gate above is authoritative. Existing unpinned actions/checkout-credential warnings in the catalog workflow are unchanged; this PR only redirects its source-path filter from the removed client to the router. This is not a globally-clean static-analysis claim.

Release

This carry intentionally leaves the package version at 0.7.12. The entitlement change targets a separate 0.8.0 release PR and the existing tag/OIDC release workflow; merging this PR does not publish to npm or update installed extensions.

Carry Patrick Wozniak's PR #164, adapted to current main.

Remove the internal generate inference fallback and its distributed client.
Keep entitled Provider API inference, read-only quota/account reporting,
credentials, persisted endpoint choices and native host pricing intact.
Cover denial diagnostics, latest-request ownership, error redaction,
terminal events and zero generate retries through real-host mocks.

BREAKING CHANGE: Go-plan inference through the internal generate endpoint
is removed. Use an account with documented Provider API entitlement.
Read-only account/quota reporting remains available.

Co-authored-by: Patrick Wozniak <email@patwoz.de>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Memory benchmark

Compared base 0137ace with PR head 6bdc1bf on the same GitHub-hosted darwin runner. Lower values are better.

Metric Base PR PR − Base Change
Stable RSS 107.6 MiB ± 0.3 MiB 107.7 MiB ± 0.6 MiB +0.1 MiB ± 0.5 MiB +0.1%
Physical footprint 61.7 MiB ± 0.3 MiB 61.5 MiB ± 0.8 MiB +0.2 MiB ± 1.5 MiB +0.4%
Physical peak 73.5 MiB ± 0.7 MiB 73.9 MiB ± 1.3 MiB +0.8 MiB ± 1.8 MiB +1.0%

Interpretation: No metric shows a clear Base-to-PR difference beyond its measured run-to-run variation.

Extension overhead above pi baseline

Metric Base overhead PR overhead Difference
Stable RSS +6.1 MiB ± 1.0 MiB +6.4 MiB ± 0.5 MiB +0.1 MiB ± 0.5 MiB
Physical footprint +3.5 MiB ± 1.6 MiB +4.1 MiB ± 1.2 MiB +0.2 MiB ± 1.5 MiB
Physical peak +5.7 MiB ± 0.8 MiB +5.2 MiB ± 1.3 MiB +0.8 MiB ± 1.8 MiB

Values are medians of 6 alternating, paired runs. The value after ± is the median absolute deviation (MAD). Each process was sampled 12 times after a 2500 ms warm-up.

Environment: pi 0.84.4, Bun 1.4.4, darwin arm64. RSS comes from ps; physical footprint and peak come from macOS footprint.

This is a comparative signal, not a pass/fail threshold. GitHub-hosted runner noise can affect absolute values.

@pierreraby
pierreraby merged commit 353e77c into main Nov 5, 2026
15 checks passed
@pierreraby
pierreraby deleted the carry/pr164-provider-only branch November 5, 2026 22:00
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.

1 participant