ai icon indicating copy to clipboard operation
ai copied to clipboard

docs: add PowerTokens to the OpenAI-compatible providers section

Open PowerTokens opened this issue 1 month ago • 3 comments

Description

Please add a PowerTokens page to content/providers/04-openai-compatible-providers/.

I'm on the PowerTokens team. PowerTokens is an OpenAI-compatible API gateway for GLM, MiniMax, Qwen and DeepSeek models, aimed at developers outside China. One API key works for every model.

The integration needs no provider package. createOpenAICompatible with a baseURL is the full setup, the same shape as the Cheaper Inference page (#21457).

The provider docs list the AI SDK

  • Vercel AI SDK guide (EN): https://docs.powertokens.ai/en/guides/vercel-ai-sdk?utm_source=github&utm_medium=oss&utm_campaign=vercel-ai-sdk
  • Vercel AI SDK guide (zh-Hans): https://docs.powertokens.ai/zh-Hans/guides/vercel-ai-sdk?utm_source=github&utm_medium=oss&utm_campaign=vercel-ai-sdk
  • Docs index: https://docs.powertokens.ai/llms.txt?utm_source=github&utm_medium=oss&utm_campaign=vercel-ai-sdk

Setup facts

  • Base URL: https://api.powertokens.ai/v1
  • Auth: Authorization: Bearer <key>
  • Model IDs: GET https://api.powertokens.ai/v1/models. This endpoint needs an API key. There is also a public list at https://powertokens.ai/models?utm_source=github&utm_medium=oss&utm_campaign=vercel-ai-sdk.

Reproduction

import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { generateText, streamText } from 'ai';

const powertokens = createOpenAICompatible({
  name: 'powertokens',
  apiKey: process.env.POWERTOKENS_API_KEY,
  baseURL: 'https://api.powertokens.ai/v1',
  includeUsage: true,
});

const { text } = await generateText({
  model: powertokens('glm-5.2'),
  prompt: 'Reply with the single word: ready',
});
console.log(text); // ready

const result = streamText({
  model: powertokens('glm-5.2'),
  prompt: 'Count from 1 to 5, separated by spaces.',
});
for await (const part of result.textStream) process.stdout.write(part); // 1 2 3 4 5

Live test on 2026-10-09: both calls returned the expected output (ready and 1 2 3 4 5).

AI SDK Version

  • ai: 7.0.136, @ai-sdk/openai-compatible: 3.0.67

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

PowerTokens avatar Oct 09 '26 01:10 PowerTokens

Identify issue type

Identified as Documentation
Confidence: High

Rationale

This is a request to add provider documentation for an integration that already works through createOpenAICompatible.

Evidence

  • The issue explicitly requests adding a PowerTokens page under the OpenAI-compatible providers documentation section.
  • It provides setup facts, links, and sample integration code intended for the new provider documentation.
  • No broken SDK behavior or required product change is reported.

ai-sdk-factory[bot] avatar Oct 09 '26 01:10 ai-sdk-factory[bot]

Identify documentation type

  • Identified as Addition
  • Confidence: High

Rationale

The request adds usable documentation for PowerTokens, an externally owned OpenAI-compatible provider not described as already meaningfully covered in the AI SDK docs. The integration already works through the existing OpenAI-compatible provider package, so no runtime support is requested.

Evidence

  • The issue explicitly requests a new PowerTokens page under content/providers/04-openai-compatible-providers/.
  • PowerTokens is an external API gateway that integrates through createOpenAICompatible with a custom baseURL.
  • The issue supplies usable setup details, authentication requirements, model discovery information, and working AI SDK examples.
  • No SDK implementation change or broken runtime behavior is reported.

ai-sdk-factory[bot] avatar Oct 09 '26 01:10 ai-sdk-factory[bot]

Documentation addition assessment

  • Subject: PowerTokens
  • External AI SDK evidence: found
  • Maintainer approval: not yet approved
  • Assessed: 2026-10-09T01:44:10.682Z

PowerTokens publishes public, provider-controlled English and Chinese guides with concrete current AI SDK instructions: install ai and @ai-sdk/openai-compatible, configure POWERTOKENS_API_KEY, create a provider with createOpenAICompatible, use https://api.powertokens.ai/v1, and call generateText with glm-5.2. This matches the current AI SDK API. PowerTokens' public model pages confirm that glm-5.2 remains available and uses an OpenAI-compatible streaming chat-completions endpoint. The authenticated models endpoint was not readable without a key, but it is not needed to establish qualification.

Evidence

  • Vercel AI SDK - PowerTokens (English) — Provides installation, environment-variable setup, complete createOpenAICompatible configuration, the PowerTokens base URL, Bearer authentication, model discovery, and a working generateText example using glm-5.2.
  • Vercel AI SDK - PowerTokens (Simplified Chinese) — Provides the same concrete AI SDK installation, provider configuration, authentication, model discovery, and generateText example in Simplified Chinese.
  • PowerTokens Documentation Index — Lists the Vercel AI SDK guide in PowerTokens' provider-controlled public documentation index.
  • Models | PowerTokens — Provides a public model catalog and confirms that the guide's glm-5.2 model ID is currently offered.
  • GLM-5.2 | PowerTokens — Confirms model ID glm-5.2 and documents Bearer authentication, streaming, and the OpenAI-compatible /v1/chat/completions endpoint with runnable request code.
  • PowerTokens | Unified AI API for DeepSeek, Qwen, Seedance GLM and More — Confirms that PowerTokens provides one API key across its models and an OpenAI-compatible chat-completions interface.
  • About | PowerTokens — Confirms provider-controlled support for OpenAI-compatible chat completions and streaming output.
  • PowerTokens Models API — The authenticated model-discovery endpoint was inspected but could not be read without an API key; the public guide and model catalog independently document its purpose.
  • PowerTokens API Base Endpoint — The configured API base endpoint was inspected but does not expose public documentation at its root; the public AI SDK guide supplies the usable configuration.

Next step

A maintainer must apply task-documentation-addition-approved before Factory can implement this addition.

ai-sdk-factory[bot] avatar Oct 09 '26 01:10 ai-sdk-factory[bot]