Skip to content

Add input for endpoint#43

Merged
sgoedecke merged 1 commit intogithub:mainfrom
dsanders11:feat/endpoint-input
Oct 20, 2025
Merged

Add input for endpoint#43
sgoedecke merged 1 commit intogithub:mainfrom
dsanders11:feat/endpoint-input

Conversation

@dsanders11
Copy link
Contributor

Based on the same input for actions/ai-inference, this is needed to allow for pointing at an org-specific models endpoint.

@dsanders11 dsanders11 requested a review from a team as a code owner October 9, 2025 04:17
Copilot AI review requested due to automatic review settings October 9, 2025 04:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for configurable inference endpoints by introducing an endpoint input parameter. This allows users to specify custom model endpoints, particularly for organization-specific models, instead of being hardcoded to the default GitHub AI inference endpoint.

  • Added endpoint input parameter to action configuration with a default value
  • Updated the OpenAI client initialization to use the configurable endpoint
  • Added documentation for the new input parameter in the README

Reviewed Changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

File Description
src/index.ts Updates OpenAI client to use configurable endpoint input instead of hardcoded URL
action.yml Adds new endpoint input with description and default value
README.md Documents the new endpoint parameter in the configuration table

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 29 to 32
const openai = new OpenAI({
apiKey: token,
baseURL: 'https://models.github.ai/inference'
baseURL: endpoint
})
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoint input should be validated to ensure it's not empty before using it as baseURL. If the input is empty, it should fall back to the default value or throw a meaningful error.

Copilot uses AI. Check for mistakes.
@dsanders11
Copy link
Contributor Author

@sgoedecke or @jalafel, could you take a look at this?

@sgoedecke
Copy link
Collaborator

LGTM, sorry about the delayed response.

@sgoedecke sgoedecke merged commit 6cac571 into github:main Oct 20, 2025
6 checks passed
@dsanders11 dsanders11 deleted the feat/endpoint-input branch October 21, 2025 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants