← ClaudeAtlas

tokenlab-openai-compatible-migrationlisted

Migrate OpenAI-compatible apps, SDKs, examples, and environment variables to TokenLab while preserving request semantics and adding live model discovery.
hedging8563/tokenlab-skills · ★ 1 · AI & Automation · score 75
Install: claude install-skill hedging8563/tokenlab-skills
# TokenLab OpenAI-Compatible Migration Use this skill when a user wants to move an existing OpenAI-compatible integration, OpenRouter setup, LiteLLM config, LangChain/LlamaIndex app, or custom SDK wrapper to TokenLab. ## What this skill should deliver - A minimal diff or config change that preserves the existing user path. - The correct TokenLab base URL and API key environment variable. - A model migration note with live discovery commands. - A native endpoint note when the old code actually needs Responses, Anthropic Messages, Gemini, media, audio, embeddings, rerank, or translation behavior. - A rollback note that restores the previous provider config. ## Default migration rules - OpenAI-compatible SDKs: - base URL: `https://api.tokenlab.sh/v1` - auth: `Authorization: Bearer $TOKENLAB_API_KEY` - chat path: `/v1/chat/completions` - Anthropic-native clients: - base URL: `https://api.tokenlab.sh` - messages path: `/v1/messages` - Gemini-native clients: - base URL: `https://api.tokenlab.sh` - generateContent path: `/v1beta/models/{model}:generateContent` - Live discovery: - `GET https://api.tokenlab.sh/v1/models` - `GET https://api.tokenlab.sh/v1/models?recommended_for=<scene>` - `GET https://api.tokenlab.sh/v1/models/:model` ## Preferred approach 1. Locate the current provider config, environment variables, and model IDs. 2. Make the smallest possible change first: - replace base URL - replace API key variable - keep SDK/client shape intact