You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Vercel AI SDK example (ai-sdk/, @ai-sdk/openai-compatible) #14
@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", dependencies ai and @ai-sdk/openai-compatible (current major versions on npm), scripts generate and stream.
ai-sdk/generate.mjs: createOpenAICompatible({ name: 'cloudgpu', apiKey: process.env.CLOUDGPU_API_KEY, baseURL: 'https://cloudgpu.app/v1' }), then generateText with cloudgpu.chatModel('kimi-k3') and a short prompt; print the text. Exit with a clear message if CLOUDGPU_API_KEY is unset.
ai-sdk/stream.mjs: same provider, streamText with cloudgpu.chatModel('glm-5.2'), print textStream chunks, and set includeUsage: true on 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 from GET 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_KEY only.
No real key is available in CI, so verify with node --check on both .mjs files and an npm install --dry-run (or equivalent) in ai-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.
npm install --dry-run in ai-sdk/ succeeded. It resolved ai 6.0.320 and @ai-sdk/openai-compatible 2.0.88, so package.json uses ^6.0.0 and ^2.0.0.
node --check on both .mjs files was not run. The sandbox needed approval for that command.
Not merged.gh pr checks reports no checks on this repo. The issue asks for node --check before 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-flash and deepseek-v4-pro.
To finish, run node --check ai-sdk/generate.mjs ai-sdk/stream.mjs and merge PR #15. Or allow node --check for me and I'll run it and merge.
· Branch
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,分支已删除。