Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

use cloudPassthroughMiddleware

Jonathan Bergb852974584db
diff --git a/server/routes.go b/server/routes.go
index 5483219b8..282813586 100644
--- a/server/routes.go
+++ b/server/routes.go
@@ -987,15 +987,7 @@ func (s *Server) SystemOneHandler(c *gin.Context) {
return
}
if ref.Source == modelSourceCloud {
- // Forward the original body with the model name normalized — re-encoding
- // the decoded request would add nulls upstream rejects (e.g. noul
- // criteria).
- normalized, err := replaceJSONModelField(body, ref.Base)
- if err != nil {
- c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
- return
- }
- proxyCloudRequest(c, normalized, cloudErrRemoteInferenceUnavailable)
+ c.JSON(http.StatusBadRequest, gin.H{"error": "System One requires a local decision model"})
return
}
m, err := s.getExistingModelForRunner(ref.Name.String(), "")
@@ -2387,7 +2379,7 @@ func (s *Server) GenerateRoutes() (http.Handler, error) {
r.POST("/api/chat", s.withInferenceRequestLogging("/api/chat", s.ChatHandler)...)
r.POST("/api/embed", s.EmbedHandler)
r.POST("/api/embeddings", s.EmbeddingsHandler)
- r.POST("/v1/systemone", s.SystemOneHandler)
+ r.POST("/v1/systemone", cloudPassthroughMiddleware(cloudErrRemoteInferenceUnavailable), s.SystemOneHandler)
// Inference (OpenAI compatibility)
// TODO(cloud-stage-a): apply Modelfile overlay deltas for local models with cloud
diff --git a/server/systemone_test.go b/server/systemone_test.go
index 6b97a9c1f..733731429 100644
--- a/server/systemone_test.go
+++ b/server/systemone_test.go
@@ -203,6 +203,7 @@ func TestSystemOneHandler(t *testing.T) {
{"omitted model", `{"state":"x","questions":{"x":{"type":"noul","instructions":"q"}}}`, nil, 400, 0, false},
{"blank model", `{"model":" ","state":"x","questions":{"x":{"type":"noul","instructions":"q"}}}`, nil, 400, 0, false},
{"missing model", `{"model":"missing","state":"x","questions":{"x":{"type":"noul","instructions":"q"}}}`, nil, 404, 0, false},
+ {"cloud", `{"model":"decision:cloud","state":"x","questions":{"x":{"type":"noul","instructions":"q"}}}`, nil, 400, 0, false},
{"safetensors success", `{"model":"safetensors-decision","state":"x","questions":{"refund":{"type":"noul","instructions":"q"}}}`, nil, 200, 1, false},
{"safetensors decision only", `{"model":"safetensors-decision-only","state":"x","questions":{"refund":{"type":"noul","instructions":"q"}}}`, nil, 200, 1, false},
{"Strands pointer head", `{"model":"safetensors-strands","state":"x","questions":{"refund":{"type":"noul","instructions":"q"}}}`, nil, 200, 1, false},