Source URL: https://simonwillison.net/2025/Aug/13/codespaces-llm/#atom-everything
Source: Simon Willison’s Weblog
Title: simonw/codespaces-llm
Feedly Summary: simonw/codespaces-llm
GitHub Codespaces provides full development environments in your browser, and is free to use with anyone with a GitHub account. Each environment has a full Linux container and a browser-based UI using VS Code.
I found out today that GitHub Codespaces come with a GITHUB_TOKEN environment variable… and that token works as an API key for accessing LLMs in the GitHub Models collection, which includes dozens of models from OpenAI, Microsoft, Mistral, xAI, DeepSeek, Meta and more.
Anthony Shaw’s llm-github-models plugin for my LLM tool allows it to talk directly to GitHub Models. I filed a suggestion that it could pick up that GITHUB_TOKEN variable automatically and Anthony shipped v0.18.0 with that feature a few hours later.
… which means you can now run the following in any Python-enabled Codespaces container and get a working llm command:
pip install llm
llm install llm-github-models
llm install llm-github-models
llm models default github/gpt-4.1
llm “Fun facts about pelicans"
Setting the default model to github/gpt-4.1 means you get free (albeit rate-limited) access to that OpenAI model.
To save you from needing to even run that sequence of commands I’ve created a new GitHub repository, simonw/codespaces-llm, which pre-installs and runs those commands for you.
Anyone with a GitHub account can use this URL to launch a new Codespaces instance with a configured llm terminal command ready to use:
codespaces.new/simonw/codespaces-llm?quickstart=1
While putting this together I wrote up what I’ve learned about devcontainers so far as a TIL: Configuring GitHub Codespaces using devcontainers.
Tags: github, projects, ai, til, openai, generative-ai, llms, llm, github-codespaces, anthony-shaw
AI Summary and Description: Yes
Summary: The provided text discusses the integration of GitHub Codespaces with LLMs (Large Language Models) through a newly developed plugin that simplifies access to these models within a browser-based development environment. This is particularly relevant for professionals interested in leveraging AI and cloud computing for software development.
Detailed Description:
The text outlines a significant advancement in using AI within GitHub Codespaces, which is a browser-based development environment. This integration targets users familiar with coding, especially those utilizing Large Language Models (LLMs). The key takeaways from the content include:
– **GitHub Codespaces**: This platform allows developers to create complete development environments directly in the browser, making it accessible to anyone with a GitHub account.
– **GITHUB_TOKEN**: An essential aspect noted is the availability of the GITHUB_TOKEN environment variable, which functions as an API key for accessing various LLMs from prominent providers such as OpenAI, Microsoft, and Meta.
– **llm-github-models Plugin**: Developed by Anthony Shaw, this plugin enables the direct communication of the LLM tool with GitHub Model collections. The suggestion made by the author for automatic picking up of the GITHUB_TOKEN was promptly incorporated into the tool, showcasing rapid development and responsiveness in the community.
– **Installation and Use**: The text includes installation commands required to set up the LLM environment in Codespaces. This demonstrates not only the ease of access but also the collaborative nature of software development in using shared resources.
– **Repository Creation**: The author has built a GitHub repository (simonw/codespaces-llm) that pre-installs the commands necessary for quick access to an LLM-enabled terminal command, further streamlining the setup process for users.
– **Learning Resources**: The text also touches upon a TIL (Today I Learned) entry written by the author, which covers configuring GitHub Codespaces using devcontainers, suggesting a proactive approach to knowledge sharing within the developer community.
In conclusion, this content is highly relevant to AI, cloud computing, and software security professionals as it demonstrates practical applications of integrating AI with cloud services, facilitating the development of intelligent applications in a streamlined manner. The community engagement and quick implementation of feature requests further emphasize the importance of collaboration and responsiveness in modern software development practices.