-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: runpod adapter #3641
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
fix: runpod adapter #3641
Conversation
Hi @justinwlin! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please run pre-commit and let it fix the formatting / import issues.
also, address inline comments.
|
||
async def register_model(self, model: Model) -> Model: | ||
""" | ||
Pass-through registration - accepts any model that the RunPod endpoint serves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will accept any more, even if it isn't supported by RunPod.
if RunPod provides an openai-compatible /v1/models, you can use check_model_availability from https://github.com/llamastack/llama-stack/blob/main/llama_stack/providers/utils/inference/openai_mixin.py#L394
""" | ||
return model | ||
|
||
async def completion( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this, we've deprecated completion in favor of openai_completion
else: | ||
return await self._nonstream_completion(request, self.client) | ||
|
||
async def chat_completion( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this, it's replaced by openai_chat_completion
|
||
return params | ||
|
||
async def embeddings( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this, embeddings is replaced by openai_embeddings
embeddings = [data.embedding for data in response.data] | ||
return EmbeddingsResponse(embeddings=embeddings) | ||
|
||
async def openai_embeddings( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the default implementation from openaimixin sufficient?
What does this PR do?
PR fixes Runpod Adapter
#3517
Test Plan
Configure the Stack
After building, edit the generated config file:
~/.llama/distributions/llamastack-runpod-dev/llamastack-runpod-dev-run.yaml
Add Your Models
Add your models to the
models
section using aliases for cleaner naming:Run the Server
Important: Use the Build-Created Virtual Environment
For Qwen3-32B-AWQ Public Endpoint (Recommended)
Quick Test
1. Chat Completion (Non-streaming)
RESULT:
2. Chat Completion (Streaming)
Clean up bash terminal version:
Result:
Check Models