
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@github/models
Advanced tools
The 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. GitHub Models has support for multiple model families, l
The GitHub Models provider for the AI SDK gives you access to the GitHub Models catalog of large language models, designed for building modern web applications. GitHub Models has support for multiple model families, like xAI, OpenAI and Meta.
[!IMPORTANT] GitHub Models is currently in pre-release and subject to GitHub Pre-release License Terms.
To learn more about integrating GitHub Models into your projects, visit the GitHub Models documentation.
The GitHub Models provider is available in the @github/models NPM package. You can install it with:
npm i @github/models
To get started, you'll need a GitHub PAT (personal access token).
import {githubModels} from '@github/models'
import {generateText} from 'ai'
const result = await generateText({
model: githubModels('meta/meta-llama-3.1-8b-instruct'),
prompt: 'Write a haiku about programming.',
})
console.log(result.text)
[!TIP] GitHub Models includes free usage for all accounts. For higher usage limits, you can opt into paid usage.
If you need a customized setup, you can import createGithubModels from @github/models and create a provider instance with your settings:
import {createGithubModels} from '@github/models'
const githubModels = createGithubModels({
org: 'my-organization',
})
apiKey string
Your GitHub Personal Access Token or Fine-Grained Token with read:models scope.
Defaults to the GITHUB_TOKEN environment variable.
org string
Organization to attribute API usage to (optional).
baseURL string
Custom API endpoint URL.
Defaults to https://models.github.ai/inference.
headers Record<string, string>
Additional headers to include with requests.
fetch (input: RequestInfo, init?: RequestInit) => Promise
Custom fetch implementation.
Defaults to the global fetch function.
You can use it as a middleware to intercept requests,
or to provide a custom fetch implementation for e.g. testing.
This 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. 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.
Distributed under the MIT License. See LICENSE for more information.
FAQs
The 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. GitHub Models has support for multiple model families, l
The npm package @github/models receives a total of 103 weekly downloads. As such, @github/models popularity was classified as not popular.
We found that @github/models demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.