Skip to content

server: streaming tools reject logprobs while n_probs works #35

Description

@am17an

Upstream: ggml-org#28478

A streaming tool request returns HTTP 400 with logprobs, while the equivalent n_probs request succeeds and includes probabilities.

Environment: current main 465e49b9, Linux aarch64, Gemma 4 12B Q4_K_M, CUDA.

{"messages":[{"role":"user","content":"Call get_weather for Singapore."}],"tools":[{"type":"function","function":{"name":"get_weather","parameters":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]}}}],"stream":true,"logprobs":true,"top_logprobs":2}

Observed: HTTP 400, logprobs is not supported with tools + stream. Replacing the last two fields with "n_probs":2 returns HTTP 200, tool calls, and top_logprobs.

The explicit rejection was introduced in f5cd27b7 and runs before top_logprobs is converted to n_probs.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions