{"id":39861616,"url":"https://github.com/wireless25/nscale-ai-provider","last_synced_at":"2026-01-20T16:44:09.375Z","repository":{"id":314467327,"uuid":"1055641058","full_name":"wireless25/nscale-ai-provider","owner":"wireless25","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-12T15:38:00.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-12T18:03:37.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wireless25.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-12T15:11:24.000Z","updated_at":"2025-09-12T15:38:04.000Z","dependencies_parsed_at":"2025-09-12T18:03:50.152Z","dependency_job_id":"d3015d4c-d489-4408-8c5f-a674d4d24c7e","html_url":"https://github.com/wireless25/nscale-ai-provider","commit_stats":null,"previous_names":["wireless25/nscale-ai-provider"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wireless25/nscale-ai-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireless25%2Fnscale-ai-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireless25%2Fnscale-ai-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireless25%2Fnscale-ai-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireless25%2Fnscale-ai-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wireless25","download_url":"https://codeload.github.com/wireless25/nscale-ai-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wireless25%2Fnscale-ai-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28537483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-18T14:00:21.543Z","updated_at":"2026-01-18T14:00:33.788Z","avatar_url":"https://github.com/wireless25.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI SDK - nscale Provider\n\n\u003e the project is under active development, for now only text models are supported.\n\nThe Nscale provider for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Nscale Serverless Inference Models](https://www.nscale.com/product/serverless).\n\n## Setup\n\nThe Nscale provider is available in the `nscale-ai-provider` module. You can install it with\n\n```bash\nnpm i nscale-ai-provider\n```\n\n## Provider Instance\n\nYou can import the default provider instance `nscale` from `nscale-ai-provider`:\n\n```ts\nimport { nscale } from 'nscale-ai-provider'\n```\n\n## Example\n\n```ts\nimport { generateText } from 'ai'\nimport { nscale } from 'nscale-ai-provider'\n\nconst { text } = await generateText({\n  model: nscale('openai/gpt-oss-20b'),\n  prompt: 'Write a vegetarian lasagna recipe for 4 people.',\n})\n```\nFor this to work you need the `NSCALE_API_KEY` environment variable set with your Nscale Service Token.\n\nAlternatively create a instance of the provider:\n\n```ts\nimport { generateText } from 'ai'\nimport { createNscale } from 'nscale-ai-provider'\n\nconst nscale = createNscale({\n  apiKey: '\u003cAPI_KEY\u003e', // Nscale Service Token\n})\n\nconst { text } = await generateText({\n  model: nscale('openai/gpt-oss-20b'),\n  prompt: 'Write a vegetarian lasagna recipe for 4 people.',\n})\n```\n\n## Nscale Client Hook\nTo get data about the Nscale models, you can use the `useNscaleModels` hook:\n\n```tsx\nimport type { NscaleModel } from 'nscale-ai-provider/client'\nimport { useNscaleModels } from 'nscale-ai-provider/client'\n\ninterface ModelSelectProps {\n  selectedModelId?: string\n  onChange: (modelId: string) =\u003e void\n}\n\nfunction ChatModelSelect({ selectedModelId, onChange }: ModelSelectProps) {\n  const { models } = useNscaleModels()\n\n  if (!models || models.length === 0) {\n    return \u003cselect disabled\u003e\u003coption\u003eNo models available\u003c/option\u003e\u003c/select\u003e\n  }\n\n  return (\n    \u003cselect\n      value={selectedModelId}\n      onChange={e =\u003e onChange(e.target.value)}\n    \u003e\n      \u003coption value=\"\"\u003eSelect a model...\u003c/option\u003e\n      {models.map(model =\u003e (\n        \u003coption key={model.id} value={model.id}\u003e\n          {model.name}\n        \u003c/option\u003e\n      ))}\n    \u003c/select\u003e\n  )\n}\n```\n\nYou can get `models` from the hook.\n\n### Interface\n```ts\ninterface NscaleModel {\n  id: string,\n  contextLength: number,\n  name: string,\n}\n\nfunction useNscaleModels(): {\n  models: NscaleModel[]\n}\n```\n\n## Documentation\n\nPlease check out the **[ai-sdk documentation](https://ai-sdk.dev/docs/ai-sdk-core/overview)** for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwireless25%2Fnscale-ai-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwireless25%2Fnscale-ai-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwireless25%2Fnscale-ai-provider/lists"}