Skip to content

Return finish_reason=tool_calls instead of stop when a tool call is needed #3927

@Quallyjiang

Description

@Quallyjiang

According to openai api reference, finish_reason shall be set to tool_calls when a tool is called. Current ovms always returns stop. Some coding agents including opencode uses finish_reason to decide if step is completed or is waiting for a tool call. Setting this field properly is important for such agent software.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions