Logo
Explore Help
Sign In
okooooooo/magpie
Watch 1
Star 0 Fork 0
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
b1fa0c5dfac4ca96f2f8529578564a7a4ecee653
magpie/internal/gateway/without_test.go
T
yetone cae88f031c agents: Qoder — magpie's models in Qoder's CLI (1.1) as a "magpie" custom provider in ~/.qoder/settings.json ($QODER_CONFIG_DIR): picking magpie/<model> or a routing group writes the provider, with every magpie model, its context, output, images and the efforts it takes, and makes it model.name; the effort is model.reasoningEffort. The comments and entries of the user's settings stay, and stepping out of magpie takes its provider away and puts back the model the user had. Qoder offers custom providers only to a signed-in account whose plan has BYOK. It asks every model for enable_thinking, which OpenAI's API refuses, so that is dropped for openai.com. Tested live: magpie → settings.json → qodercli -p → magpie's gateway → upstream, the reply streamed back
2026-09-27 06:28:14 +08:00

15 lines
437 B
Go
Raw Blame History

package gateway
import "testing"
func TestWithoutFields(t *testing.T) {
in := []byte(`{"model":"gpt-5","enable_thinking":true,"max_tokens":12345678901234}`)
if got := string(withoutFields(in, "enable_thinking")); got != `{"max_tokens":12345678901234,"model":"gpt-5"}` {
t.Fatal(got)
}
plain := []byte(`{"model":"x"}`)
if got := withoutFields(plain, "enable_thinking"); string(got) != string(plain) {
t.Fatal(string(got))
}
}
Reference in new issue View Git Blame Copy Permalink
Powered by Gitea Version: 28.3.0 Page: 47ms Template: 4ms
Auto
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API