Smoke evidence runner

Capture redacted smoke-test evidence for an OpenAI-compatible API

Use the TKEN examples runner when a team needs paste-ready endpoint evidence for an issue report, rollout note, release checklist, or handoff. It checks /models first, can run one non-streaming /chat/completions request, and writes Markdown or JSON without saving keys, prompts, or full response text.

Redacted evidence Markdown or JSON
git clone https://github.com/vivian254338489/tken-openai-compatible-examples.git
cd tken-openai-compatible-examples

$env:TKEN_API_KEY="sk-your-tken-key"
$env:TKEN_BASE_URL="https://www.tken.shop/v1"
$env:TKEN_MODEL="replace-with-an-available-model"

node tools/smoke-evidence.mjs `
  --base-url $env:TKEN_BASE_URL `
  --api-key-env TKEN_API_KEY `
  --model $env:TKEN_MODEL `
  --out smoke-evidence.md
GET /models status, latency, and model IDs
Optional non-streaming /chat/completions shape check
No API keys, prompts, or full response text stored

What the evidence captures

The runner records enough endpoint behavior to debug routing, authentication, model discovery, and response shape while keeping sensitive request and provider details out of the artifact.

Endpoint
Base URL, usually ending in /v1
Models
Status, latency, count, and sample IDs
Selection
Requested model and selected model
Chat shape
Choices, finish reason, usage presence
Failure class
Auth, route, quota, timeout, upstream
Format
Markdown for humans or JSON for tooling

Common runs

Markdown evidence for an issue or rollout note

Generate a readable `smoke-evidence.md` after /models and one non-streaming chat check. Paste it into a ticket, release checklist, or internal approval record.

node tools/smoke-evidence.mjs \
  --base-url "$TKEN_BASE_URL" \
  --api-key-env TKEN_API_KEY \
  --model "$TKEN_MODEL" \
  --out smoke-evidence.md

Models-only evidence before choosing a model

Start with /models when you want to prove the base URL, authentication, and model discovery before sending prompt content.

node tools/smoke-evidence.mjs --skip-chat --out models-evidence.md

JSON evidence for automation

Use JSON when comparing environments, saving release artifacts, or feeding a lightweight CI or deployment checklist.

node tools/smoke-evidence.mjs --format json --out smoke-evidence.json

Offline sample for renderer checks

Sample mode lets you test evidence rendering and approval workflows without network calls or an API key.

node tools/smoke-evidence.mjs --sample --json

What it deliberately leaves out

Evidence is useful only if it can be shared safely. The runner reads keys from environment variables, avoids storing private prompt and response bodies, and redacts common token-like and identifier-like values from error previews.

Secrets
No API keys or bearer tokens
Prompt
Prompt text is sent, not stored
Response
Full generated text is not saved
Provider account
No account screens or usage records
Identifiers
Long opaque IDs are redacted in errors
Scope
One endpoint check, not a load test

Failure classes to check before changing code

auth or permission

The endpoint reached the gateway, but the key, account scope, or permission path needs attention before SDK or app debugging.

base_url_or_route

Check the /v1 suffix, path spelling, proxy route, and whether the client is accidentally calling a provider URL instead of TKEN.

rate_or_quota or timeout

Treat these as traffic, quota, network, or upstream-availability signals before rewriting request payloads.

upstream_or_gateway or response shape

Save the redacted class, status, latency, selected model, and shape-level details so the next engineer can reproduce the path.

TKEN is an independent third-party OpenAI-compatible API gateway and is not officially affiliated with OpenAI or other model providers. Model availability, pricing, context limits, streaming behavior, tool support, and rate limits can vary by account, channel, and provider status. Live /pricing remains the source of truth.

Smoke evidence runner FAQ

When should I use the runner instead of an API client?

Use the Postman or Bruno smoke-test guide for manual inspection. Use the runner when you need a repeatable Markdown or JSON artifact for an issue, release note, rollout checklist, or team handoff.

Does it test streaming?

No. It focuses on /models and one optional non-streaming /chat/completions request so the artifact stays compact and easy to compare. Use the streaming guide after the basic endpoint path is verified.

Where is the release?

The v0.23.0 examples release includes the smoke evidence runner, documentation, and release checks. Open the v0.23.0 release.

Can I adapt it for another OpenAI-compatible endpoint?

Yes. Pass a different base URL and API-key environment variable, then keep the same redaction and evidence rules for safer sharing.

Turn endpoint checks into safe evidence

Create a TKEN key, clone the examples repo, run /models evidence, then add one non-streaming chat check when you need a complete endpoint handoff.