Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions model_gateway/src/routers/grpc/harmony/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,22 @@ pub(crate) fn convert_harmony_logprobs(proto_logprobs: &ProtoOutputLogProbs) ->
})
}

/// Built-in tools that are added to the system message
/// Built-in tools that are added to the system message.
///
/// Scoped to the hosted tools gpt-oss was trained to emit (per the
/// openai-harmony spec). Advertising a tool here that the model was not
/// trained for — for example `image_generation`, `shell`, `computer`,
/// `apply_patch`, `local_shell` — leads to undefined behavior: the model
/// may hallucinate a malformed tool call, ignore the advertisement, or
/// garble output. Hosted tools outside this set fall through to the
/// custom/function-tool path and, in the future, will be gated
/// per-worker via explicit hosted-tool capability flags + MCP dispatch.
const BUILTIN_TOOLS: &[&str] = &[
"web_search_preview",
"web_search",
"code_interpreter",
"container",
"file_search",
"image_generation",
"shell",
];
Comment thread
slin1237 marked this conversation as resolved.

/// Trait for tool-like objects that can be converted to Harmony ToolDescription
Expand Down
Loading