Repository navigation
Closed
Description
@claude please add a Vercel AI SDK example folder to this repo. Docs/example change only; open a PR from a claude/issue-* branch and merge it when checks pass.
Why
The Vercel AI SDK docs (vercel/ai, content/providers/04-openai-compatible-providers/) only list a provider when the provider publishes its own public AI SDK instructions. This folder is that public reference for CloudGPU.
Add ai-sdk/
ai-sdk/package.json:"type": "module", dependenciesaiand@ai-sdk/openai-compatible(current major versions on npm), scriptsgenerateandstream.ai-sdk/generate.mjs:createOpenAICompatible({ name: 'cloudgpu', apiKey: process.env.CLOUDGPU_API_KEY, baseURL: 'https://cloudgpu.app/v1' }), thengenerateTextwithcloudgpu.chatModel('kimi-k3')and a short prompt; print the text. Exit with a clear message ifCLOUDGPU_API_KEYis unset.ai-sdk/stream.mjs: same provider,streamTextwithcloudgpu.chatModel('glm-5.2'), printtextStreamchunks, and setincludeUsage: trueon the provider.ai-sdk/README.md: what it is (CloudGPU's OpenAI-compatible model API used through@ai-sdk/openai-compatible), install (npm install ai @ai-sdk/openai-compatible),export CLOUDGPU_API_KEY=...(keys from https://cloudgpu.app/api/console), the provider snippet, both examples, how to switch model IDs (e.g.kimi-k3,glm-5.2,deepseek-v4.1-flash,deepseek-v4-pro; current list fromGET https://cloudgpu.app/v1/models), and links to https://cloudgpu.app/api/docs and the AI SDK OpenAI Compatible provider docs (https://ai-sdk.dev/providers/openai-compatible-providers).- Root
README.md: add one table row only,[ai-sdk/](ai-sdk/README.md)| "Vercel AI SDK (@ai-sdk/openai-compatible): generateText and streamText". Do not change anything else in the root README.
Constraints
- In the new files: no prices, no speed/latency/region claims, no words like cheap/cheapest, no "open source"/"open-weight", and name only the four model IDs above (all live on /v1/models as of 2026-10-31 11:00 UTC+8).
- Never commit a real API key; use
process.env.CLOUDGPU_API_KEYonly. - No real key is available in CI, so verify with
node --checkon both .mjs files and annpm install --dry-run(or equivalent) inai-sdk/; say in the PR that no live call was made.
Done when
ai-sdk/ with the four files is on main, and the root README has the new row.
Metadata
Metadata
Assignees
Labels
No labels
Activity
claude commentedon Oct 31, 2026
Claude finished @mrhy7176's task in 1m 0s —— View job
Vercel AI SDK example: PR open, not merged
ai-sdk/package.json,generate.mjs,stream.mjsandREADME.mdREADME.mdCloses #14in its body: Add Vercel AI SDK example (ai-sdk/) #15npm install --dry-runinai-sdk/succeeded. It resolvedai6.0.320 and@ai-sdk/openai-compatible2.0.88, sopackage.jsonuses^6.0.0and^2.0.0.node --checkon both.mjsfiles was not run. The sandbox needed approval for that command.gh pr checksreports no checks on this repo. The issue asks fornode --checkbefore merging, and I couldn't run it, so I left the merge for you.No live API call was made, because there is no key in CI. The new files contain no prices, speed or region claims, and no model IDs beyond
kimi-k3,glm-5.2,deepseek-v4.1-flashanddeepseek-v4-pro.To finish, run
node --check ai-sdk/generate.mjs ai-sdk/stream.mjsand merge PR #15. Or allownode --checkfor me and I'll run it and merge.· Branch
github-actions commentedon Oct 31, 2026
✅ claude-automerge:PR #15 已 squash 合并到
main,分支已删除。