Skip to content

Commit

Permalink
[Frontend][OpenAI] Support for returning max_model_len on /v1/models …
Browse files Browse the repository at this point in the history
…response (vllm-project#4643)
  • Loading branch information
Avinash-Raj authored Jun 2, 2024
1 parent d0420b3 commit 867e5a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions vllm/entrypoints/openai/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class ModelCard(OpenAIBaseModel):
owned_by: str = "vllm"
root: Optional[str] = None
parent: Optional[str] = None
max_model_len: Optional[int] = None
permission: List[ModelPermission] = Field(default_factory=list)


Expand Down
1 change: 1 addition & 0 deletions vllm/entrypoints/openai/serving_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ async def show_available_models(self) -> ModelList:
"""Show available models. Right now we only have one model."""
model_cards = [
ModelCard(id=served_model_name,
max_model_len=self.max_model_len,
root=self.served_model_names[0],
permission=[ModelPermission()])
for served_model_name in self.served_model_names
Expand Down

0 comments on commit 867e5a5

Please sign in to comment.