Skip to content

update CompletionMessage attributes in openai.proto #86

Merged
dongwang218 merged 2 commits intomainfrom
yli1/openai_proto
Sep 4, 2025
Merged

update CompletionMessage attributes in openai.proto #86
dongwang218 merged 2 commits intomainfrom
yli1/openai_proto

Conversation

@yangli5t
Copy link
Contributor

@yangli5t yangli5t commented Sep 4, 2025

Why ?

add refusal, function_call, tool_call, reasoning_content
according to openai protocol https://github.com/vllm-project/vllm/blob/main/vllm/entrypoints/openai/protocol.py#L1735-L1742
so that grpc call can be made with models like gpt-oss-120b

python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./matrix/app_server/llm/openai.proto

Test plan

deployed a gpt-oss-120b model
python -m matrix deploy_applications --action add --applications "[{'model_name': '/datasets/pretrained-llms/gpt-oss-120b', 'model_size': 'gpt-oss-120b', 'name': 'gpt120b_grpc', 'use_grpc': 'true'}]"
successfully got response.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 4, 2025
await self.openai_serving_chat.models.init_static_loras()
generator = await self.openai_serving_completion.create_completion(
completion_request,
Request( # this Request is purely dummy, it is changed to optional in vllm's recent pull https://github.com/vllm-project/vllm/pull/12503
Copy link
Contributor

Choose a reason for hiding this comment

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

does removing it work for vllm 0.8.3 too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. this was updated long time ago.

Comment on lines +45 to +54
message FunctionCall {
string name = 1;
string arguments = 2;
}
message ToolCall {
string id = 1;
string type = 2; // Only "function" is valid
FunctionCall function = 3;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

how multiple arguments are represented in proto?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dongwang218 dongwang218 merged commit b9330fb into main Sep 4, 2025
8 checks passed
@dongwang218 dongwang218 deleted the yli1/openai_proto branch September 4, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants