Skip to content

feat(py/genkit): added the resolve_method for openai compatible plugin #3055

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 3 commits into
base: main
Choose a base branch
from

Conversation

hendrixmar
Copy link
Contributor

Description:

This PR introduces the concrete implementation of the resolve_method for the OpenAI compat plugin.

@hendrixmar hendrixmar requested a review from pavelgj as a code owner June 10, 2025 19:17
@github-actions github-actions bot added feature New feature or request python Python labels Jun 10, 2025
config_schema=OpenAIConfig,
metadata={
'model': {
'label': f"OpenAI - {name}",
Copy link
Contributor

Choose a reason for hiding this comment

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

let's define the default supports for this metadata field.

},
)

def resolve_action( # noqa: B027
Copy link
Contributor

Choose a reason for hiding this comment

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

The code is duplicated.

@@ -69,6 +73,80 @@ def initialize(self, ai: GenkitRegistry) -> None:
},
)

def resolve_action( # noqa: B027
Copy link
Contributor

Choose a reason for hiding this comment

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

let's also remove the # noqa: B027 comment

@AbeJLazaro
Copy link
Contributor

Let's check if it is required to keep using the handler. I think the model generate method is enough, and the handler is only a wrapper to determine which models are valid based on the supported models variable. We are going to deprecate those validations, so maybe the handler is not required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request python Python
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants