Skip to content

Conversation

LukeAVanDrie
Copy link
Contributor

The openAIModelServerClient could not be instantiated directly as it declared no supported APIs. While this may have been intended to enforce it as a base class, making it concrete provides more flexibility.

This change allows the client to be used with any generic OpenAI-compatible endpoint. It also centralizes the API list so redundant overrides can be removed from the vLLM, TGI, and SGLang subclasses, improving maintainability.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 7, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LukeAVanDrie
Once this PR has been reviewed and has the lgtm label, please assign jeffwan for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @LukeAVanDrie!

It looks like this is your first PR to kubernetes-sigs/inference-perf 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/inference-perf has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 7, 2025
@LukeAVanDrie
Copy link
Contributor Author

I am looking into making some perf improvements in the client code. As I haven't contributed to this project yet, I wanted to start with a smaller change to familiarize myself with the PR and CI/CD processes.

If it's intended that openAIModelServerClient is a class that must be subclassed, I'll drop this change, but I would suggest renaming the class itself to indicate it is intended as a base class only.

@LukeAVanDrie LukeAVanDrie force-pushed the refactor/client-architecture branch from 56714ad to 052d06c Compare October 7, 2025 20:40
The openAIModelServerClient could not be instantiated directly as it
declared no supported APIs. While this may have been intended to
enforce it as a base class, making it concrete provides more
flexibility.

This change allows the client to be used with any generic
OpenAI-compatible endpoint. It also centralizes the API list so
redundant overrides can be removed from the vLLM, TGI, and SGLang
subclasses, improving maintainability.
@LukeAVanDrie LukeAVanDrie force-pushed the refactor/client-architecture branch from 052d06c to 8bbbd52 Compare October 7, 2025 20:40
Copy link
Contributor

@achandrasekar achandrasekar left a comment

Choose a reason for hiding this comment

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

Thanks for sending this out! This can simplify things quite a bit.

Can you also include how you tested the change with an example config and a successful run - one for the new openai type and another for vllm?


def get_supported_apis(self) -> List[APIType]:
return []
return [APIType.Completion, APIType.Chat]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a type openai here? This could be the generic type that someone can run with if it is one of the model servers where we don't have specific metrics support?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the documentation as well along with the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants