1. Run the no-network quickcheck
Start with the local configuration guard. It should pass before any SDK call, endpoint tester, CI step, or app workflow points at the TKEN base URL.
node tools/openai-sdk-base-url-quickcheck.mjs --json
SDK base URL quickcheck
Run a no-network guard before changing an existing Node.js or Python OpenAI SDK app. Confirm the TKEN /v1 base URL shape, API-key environment boundary, model-selection readiness, JSON output, and strict CI behavior before the first live endpoint call.
git clone https://github.com/vivian254338489/tken-openai-compatible-examples.git
cd tken-openai-compatible-examples
$env:TKEN_BASE_URL="https://www.tken.shop/v1"
$env:TKEN_API_KEY="sk-your-tken-key"
$env:TKEN_MODEL="replace-with-an-available-model"
node tools/openai-sdk-base-url-quickcheck.mjs --strict --json
The tool does not prove that every model or optional endpoint is available. It proves that the local SDK configuration is shaped correctly enough to move into live model discovery without wasting time on homepage URLs, missing environment variables, or accidental direct-provider traffic.
Start with the local configuration guard. It should pass before any SDK call, endpoint tester, CI step, or app workflow points at the TKEN base URL.
node tools/openai-sdk-base-url-quickcheck.mjs --json
After the config shape is correct, call /models and select a model ID returned for the current key and account. Do not assume that a model name copied from another provider route is available.
node tools/endpoint-tester.mjs --base-url "$TKEN_BASE_URL" --api-key-env TKEN_API_KEY --skip-chat
Use a non-sensitive prompt, the selected model ID, and one non-streaming /chat/completions request before testing streaming, tool calls, JSON mode, embeddings, or production traffic.
node tools/endpoint-tester.mjs --base-url "$TKEN_BASE_URL" --api-key-env TKEN_API_KEY --model "$TKEN_MODEL"
Switch one low-risk SDK call to TKEN, keep timeout and retry limits conservative, then expand only after the app-level response shape is confirmed.
TKEN examples use `TKEN_BASE_URL` and `TKEN_API_KEY` so gateway traffic is visibly separated from direct provider traffic. If an app already depends on `OPENAI_BASE_URL`, confirm the runtime config path before changing shared environment variables.
The app may be pointing at https://www.tken.shop instead of https://www.tken.shop/v1. Run the quickcheck with the exact base URL before debugging SDK payloads.
Confirm the API-key environment variable is present without printing it. Then verify the key is scoped to the route and account you are testing.
Re-run /models and choose a returned ID. Treat model availability as account and route specific, not implied by SDK compatibility.
Add `--strict --json` before the live endpoint test so missing environment variables fail early with a compact machine-readable result.
It catches configuration mistakes that do not require a network call, such as a missing /v1 suffix, missing key environment variable, or absent model-selection variable in strict mode.
No. Passing means the SDK configuration is ready for model discovery. Test streaming, JSON mode, tool calls, embeddings, and other endpoint-specific behavior separately.
The v0.24.0 examples release includes the quickcheck tool, documentation, package script, and local validation coverage. Open the v0.24.0 release.
Yes. Pass a different base URL and API-key environment variable, then keep the same no-key-printing and no-network guardrails.
Create a TKEN key, set https://www.tken.shop/v1 as the base URL, run the quickcheck, then use /models and one chat request to prove the live endpoint path.