{"id":30521341,"url":"https://github.com/github/models-ai-sdk","last_synced_at":"2025-08-26T17:13:46.128Z","repository":{"id":305050578,"uuid":"1015226889","full_name":"github/models-ai-sdk","owner":"github","description":"GitHub Models AI SDK","archived":false,"fork":false,"pushed_at":"2025-08-25T20:34:31.000Z","size":133,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-25T23:46:10.944Z","etag":null,"topics":["ai","github-models","sdk"],"latest_commit_sha":null,"homepage":"https://npmjs.com/@github/models","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license.txt","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"security.md","support":"support.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-07T07:33:35.000Z","updated_at":"2025-08-20T19:05:55.000Z","dependencies_parsed_at":"2025-07-18T04:37:02.456Z","dependency_job_id":"2bb81fc6-e494-4079-841f-3a9cbf3003bd","html_url":"https://github.com/github/models-ai-sdk","commit_stats":null,"previous_names":["github/models-ai-sdk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/github/models-ai-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fmodels-ai-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fmodels-ai-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fmodels-ai-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fmodels-ai-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/models-ai-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fmodels-ai-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272154913,"owners_count":24882931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai","github-models","sdk"],"created_at":"2025-08-26T17:13:43.081Z","updated_at":"2025-08-26T17:13:46.122Z","avatar_url":"https://github.com/github.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI SDK - GitHub Models\n\nThe GitHub Models provider for the [AI SDK](https://ai-sdk.dev/docs) gives you access to the [GitHub Models][feature] catalog of large language models, designed for building modern web applications.\nGitHub Models has support for multiple model families, like [xAI](https://github.com/marketplace?publisher=xAI\u0026type=models), [OpenAI](https://github.com/marketplace?publisher=OpenAI\u0026type=models) and [Meta](https://github.com/marketplace?publisher=Meta\u0026type=models).\n\n\u003e [!IMPORTANT]\n\u003e GitHub Models is currently in pre-release and subject to [GitHub Pre-release License Terms](https://docs.github.com/en/site-policy/github-terms/github-pre-release-license-terms).\n\nTo learn more about integrating GitHub Models into your projects, visit the [GitHub Models documentation](https://docs.github.com/en/github-models).\n\n## Setup\n\nThe GitHub Models provider is available in the `@github/models` NPM package. You can install it with:\n\n```bash\nnpm i @github/models\n```\n\n## Quick Start\n\nTo get started, you'll need a [GitHub PAT (personal access token)](https://github.com/settings/tokens).\n\n```ts\nimport {githubModels} from '@github/models'\nimport {generateText} from 'ai'\n\nconst result = await generateText({\n  model: githubModels('meta/meta-llama-3.1-8b-instruct'),\n  prompt: 'Write a haiku about programming.',\n})\n\nconsole.log(result.text)\n```\n\n\u003e [!TIP]\n\u003e GitHub Models includes [free usage](https://gh.io/models-rate-limits) for all accounts. For higher usage limits, you can opt into [paid usage](https://gh.io/github-models-pricing).\n\nIf you need a customized setup, you can import `createGithubModels` from `@github/models` and create a provider instance with your settings:\n\n```ts\nimport {createGithubModels} from '@github/models'\n\nconst githubModels = createGithubModels({\n  org: 'my-organization',\n})\n```\n\n### Configuration Options\n\n- **apiKey** _string_\n\n  Your GitHub [Personal Access Token](https://github.com/settings/tokens) or [Fine-Grained Token](https://github.com/settings/personal-access-tokens) with `read:models` scope.\n  Defaults to the `GITHUB_TOKEN` environment variable.\n\n- **org** _string_\n\n  Organization to attribute API usage to (optional).\n\n- **baseURL** _string_\n\n  Custom API endpoint URL.\n  Defaults to `https://models.github.ai/inference`.\n\n- **headers** _Record\u003cstring, string\u003e_\n\n  Additional headers to include with requests.\n\n- **fetch** _(input: RequestInfo, init?: RequestInit) =\u003e Promise\u003cResponse\u003e_\n\n  Custom [fetch](https://developer.mozilla.org/en-US/docs/Web/API/fetch) implementation.\n  Defaults to the global `fetch` function.\n  You can use it as a middleware to intercept requests,\n  or to provide a custom fetch implementation for e.g. testing.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of GitHub's trademarks or logos is subject to and must follow [GitHub's Brand Toolkit](https://brand.github.com/). Use of GitHub's trademarks or logos in modified versions of this project must not cause confusion or imply GitHub sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.\n\n## License\n\nDistributed under the MIT License. See [LICENSE](./license.txt) for more information.\n\n\u003c!-- LINKS --\u003e\n\n[feature]: https://github.com/features/models\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fmodels-ai-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fmodels-ai-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fmodels-ai-sdk/lists"}