8000 Add GitHub Models as default inference provider by sgoedecke · Pull Request #481 · ultralytics/actions · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Add GitHub Models as default inference provider #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sgoedecke
< 8000 /span> Copy link
@sgoedecke sgoedecke commented Jul 1, 2025

GitHub now offers a free LLM inference API that's native in GitHub Actions, so long as you set the models: read permission. This PR updates the existing OpenAI utility functions to use GitHub Models as the default provider, while still allowing the use of OpenAI if an API key is provided.

If this isn't something you want to do, no worries - I just figured it'd be nice to let people use the cool AI-driven parts of the action without having to go and set up an OpenAI repository secret.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

This update adds support for using GitHub Models as an alternative to OpenAI for LLM-powered features in Ultralytics Actions, making it easier and more flexible to run AI tasks. 🤖🔄

📊 Key Changes

  • Added the ability to use GitHub Models for LLM inference when an OpenAI API key is not provided.
  • Updated documentation to explain the new GitHub Models option and required permissions.
  • Enhanced the code to automatically choose between OpenAI and GitHub Models based on available credentials.
  • Added new tests to ensure correct behavior for both OpenAI and GitHub Models, as well as error handling when no credentials are present.

🎯 Purpose & Impact

  • More Flexibility: Users can now use free GitHub Models for AI tasks, reducing reliance on OpenAI API keys.
  • Easier Setup: No need to obtain an OpenAI API key if you prefer GitHub Models—just use your GitHub token.
  • Improved Reliability: The system automatically selects the best available LLM provider, ensuring smoother operation.
  • Better Documentation: Clearer setup instructions help users get started quickly with either provider.

This makes Ultralytics Actions more accessible and user-friendly for a wider range of projects! 🚀

GitHub now offers a free LLM inference API that's native in GitHub Actions,
so long as you set the models: read permission. This commit updates the
existing OpenAI utility functions to use GitHub Models as the default
provider, while still allowing the use of OpenAI if an API key is provided.
@sgoedecke sgoedecke changed the title Add GitHub Models as default provider Add GitHub Models as default inference provider Jul 1, 2025
Copy link
github-actions bot commented Jul 1, 2025

All Contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@UltralyticsAssistant UltralyticsAssistant added devops GitHub Devops or MLops documentation Improvements or additions to documentation enhancement New feature or request labels Jul 1, 2025
@sgoedecke
Copy link
Author

I have read the CLA Document and I sign the CLA

@UltralyticsAssistant
Copy link
Member

👋 Hello @sgoedecke, thank you for submitting an ultralytics/actions 🚀 PR! This is an automated response to help streamline your contribution. An Ultralytics engineer will review your pull request and assist you further soon.

Please review the checklist below to ensure a smooth integration:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear and follow the project's conventions.
  • Synchronize with Source: Confirm your PR is up to date with the ultralytics/actions main branch. Update it if necessary by clicking 'Update branch' or running git pull and git merge main locally.
  • Ensure CI Checks Pass: Make sure all Ultralytics Continuous Integration (CI) checks are passing. Address any issues if checks fail.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm all tests pass.
  • Sign the CLA: If this is your first Ultralytics PR, please sign our Contributor License Agreement by commenting "I have read the CLA Document and I sign the CLA".
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more details, please see our Contributing Guide. If you have any questions, feel free to leave a comment. Thank you for your contribution to Ultralytics! 🚀🤖

Copy link
codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@glenn-jocher
Copy link
Member

@sgoedecke super interesting, thanks for the PR! Will review this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops GitHub Devops or MLops documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0