Skip to content
13 changes: 7 additions & 6 deletions dto/channel_settings.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package dto

type ChannelSettings struct {
ForceFormat bool `json:"force_format,omitempty"`
ThinkingToContent bool `json:"thinking_to_content,omitempty"`
Proxy string `json:"proxy"`
PassThroughBodyEnabled bool `json:"pass_through_body_enabled,omitempty"`
SystemPrompt string `json:"system_prompt,omitempty"`
SystemPromptOverride bool `json:"system_prompt_override,omitempty"`
ForceFormat bool `json:"force_format,omitempty"`
ThinkingToContent bool `json:"thinking_to_content,omitempty"`
Proxy string `json:"proxy"`
PassThroughBodyEnabled bool `json:"pass_through_body_enabled,omitempty"`
NonStreamUpstreamStream bool `json:"non_stream_upstream_stream,omitempty"`
SystemPrompt string `json:"system_prompt,omitempty"`
SystemPromptOverride bool `json:"system_prompt_override,omitempty"`
}

type VertexKeyType string
Expand Down
6 changes: 5 additions & 1 deletion relay/channel/openai/adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,11 @@ func (a *Adaptor) DoResponse(c *gin.Context, resp *http.Response, info *relaycom
usage, err = OaiResponsesCompactionHandler(c, resp)
default:
if info.IsStream {
usage, err = OaiStreamHandler(c, info, resp)
if info.UpstreamStreamForNonStream && info.RelayMode == relayconstant.RelayModeChatCompletions {
usage, err = OaiStreamToNonStreamHandler(c, info, resp)
} else {
usage, err = OaiStreamHandler(c, info, resp)
}
} else {
usage, err = OpenaiHandler(c, info, resp)
}
Expand Down
Loading