simonw/codespaces-llm
Extracto
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 …
Resumen
Resumen Principal
La integración innovadora de Modelos de Lenguaje Grandes (LLMs) directamente dentro de GitHub Codespaces marca un avance significativo, transformando este entorno de desarrollo basado en el navegador en una plataforma altamente accesible para la experimentación con IA. El núcleo de esta funcionalidad reside en la variable de entorno GITHUB_TOKEN
, inherente a cada instancia de Codespaces, que ahora actúa como una clave API para acceder a la vasta colección de GitHub Models. Esta colección incluye decenas de LLMs de proveedores líderes como OpenAI, Microsoft, Mistral y Meta, democratizando el acceso a tecnología de IA avanzada. Gracias a la herramienta llm
de Simon Willison y el plugin llm-github-models
de Anthony Shaw, el proceso se simplifica aún más, ya que el plugin detecta y utiliza automáticamente este token. Esto permite a los usuarios obtener acceso gratuito (aunque con limitación de tasa) a modelos potentes como github/gpt-4.1
(basado en OpenAI). Para maximizar la facilidad de uso, Simon Willison ha creado el repositorio simonw/codespaces-llm
, que pre-configura un entorno Codespaces, permitiendo a cualquier usuario de GitHub lanzar una instancia lista para usar LLMs con una
Contenido
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.
Fuente: Simon Willison’s Weblog