docs: refresh bundled provider package examples

This commit is contained in:
Peter Steinberger
2026-04-04 12:52:55 +01:00
parent 120b1d2ed2
commit 502b024523
3 changed files with 17 additions and 0 deletions

View File

@@ -245,6 +245,9 @@ barrels unless the seam is truly generic. Current bundled examples:
- OpenAI: provider builders, default-model helpers, realtime providers
- OpenRouter: provider builder plus onboarding/config helpers
If a helper is only useful inside one bundled provider package, keep it on that
package-root seam instead of promoting it into `openclaw/plugin-sdk/*`.
## Pre-submission checklist
<Check>**package.json** has correct `openclaw` metadata</Check>

View File

@@ -301,6 +301,13 @@ stream helpers in its own public `api.ts` / `contract-api.ts` seam instead of
promoting Anthropic beta-header and `service_tier` logic into a generic
`plugin-sdk/*` contract.
Other current bundled examples:
- `@openclaw/openai-provider`: `api.ts` exports provider builders,
default-model helpers, and realtime provider builders
- `@openclaw/openrouter-provider`: `api.ts` exports the provider builder plus
onboarding/config helpers
<Warning>
Extension production code should also avoid `openclaw/plugin-sdk/<other-plugin>`
imports. If a helper is truly shared, promote it to a neutral SDK subpath

View File

@@ -317,6 +317,13 @@ API key auth, and dynamic model resolution.
`contract-api.ts` seam. Those helpers remain Anthropic-specific because
they also encode Claude OAuth beta handling and `context1m` gating.
The same package-root pattern also backs other bundled providers:
- `@openclaw/openai-provider`: `api.ts` exports provider builders,
default-model helpers, and realtime provider builders
- `@openclaw/openrouter-provider`: `api.ts` exports the provider builder
plus onboarding/config helpers
<Tabs>
<Tab title="Token exchange">
For providers that need a token exchange before each inference call: