codex: auto-review follows the session on a ChatGPT Free plan (cybercaius)
cybercaius on Discord measured codex-auto-review spending a Free
account's allowance ("实测在 free 账号不免费"). magpie left an unset
auto-review to Codex (codex-auto-review), and held such a call by no
usage cap, on #1593's finding that OpenAI counts it in no window; that
was measured on a paid account.
Decision: with nothing picked and Codex signed in to a Free plan (the
ID token's chatgpt_plan_type is "free"), auto-review counts as "Same as
the session", as Codex's other side calls do, so the review stops
spending the free allowance when the session is on one of magpie's
models. On Codex's own model nothing changes (its entries keep OpenAI's
reviewer). A paid plan, or a plan magpie can't read, keeps Codex's pick;
a pick in Settings always wins.
- codexcat.AutoReviewModel is the setting in effect; the plan comes from
provider.CodexSignInPlan (liveLogin, keychain read cached), read once
per model list, and the list tag already re-stamps on auth.json.
- freeOnChatGPT no longer exempts a Free plan's codex-auto-review call
from usage caps (capHeld).
- GUI tooltip says it (en, zh, zh-TW, ja, de); docs updated.
Run at the pushed tree (on origin/main 88ac42843), go test -tags nogui
-count=1 -timeout 45m: internal/gateway ok 447s, internal/codexcat ok,
internal/gui ok, internal/agent/... ok; internal/provider crashes in
TestUnreadLoginsWriteErrorsKeepCredentials ("close of synctest channel
from outside bubble" in filememo.Forget), red the same alone on
origin/main 88ac42843, filed as #3632 with a patch there; with that
test skipped internal/provider ok 152s. gofmt -l clean; GOOS=linux go
vet -tags nogui ./... and GOOS=windows go vet ./... clean.
- GUI (chromium + webkit, every language): codex-auto-review, i18n-keys,
gui-ja, gui-zh-tw, gui-de, search-keys, agent-prefs: 79 of 79 pass
Broken by hand: with AutoReviewModel returning the raw setting,
TestCodexAutoReviewOnAFreePlan fails; with freeOnChatGPT ignoring the
plan, TestAccountCapHoldsAutoReviewOnAFreePlan fails.
TestCodexSignInPlan reads a Free plan from a sandbox auth.json.
Not tried: a real Free ChatGPT account; whether OpenAI bills
codex-auto-review on Plus/Pro is still #1593's measurement.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -401,7 +401,7 @@ covers it in both engines, every language and a narrow window.
|
||||
- Wails calls the tray's click handler both for the icon's click (`Activate`) and when the tray host opens the icon's menu (dbusmenu's "opened" event). KDE opens the menu on a right-click, and the panel that click opened took the focus and shut the menu on Wayland. On Linux the handler ignores the call when it comes from the menu opening (`menuOpening` in [`trayclick.go`](../../internal/gui/trayclick.go), which looks for Wails' `(*linuxSystemTray).Event` among its callers; `TestTrayMenuOpenFrameIsWails` fails if Wails renames it or stops calling the handler there) (#1430).
|
||||
- On GTK 3 builds, the app gives GDK a font DPI before the first webview when it has none (`fontDPI`, [`fontdpi_gtk3.h`](../../internal/gui/fontdpi_gtk3.h)). GDK's unset value is -1, and WebKitGTK 2.54's GTK 3 settings reader multiplies it by 1024 unchecked, so every page lays out at a negative width with a 9000000px font (#1371). An unset DPI takes `gtk-xft-dpi`, or 96, times a valid `GDK_DPI_SCALE`; a positive one is left alone. Wails initialises GTK (its GtkApplication) only inside `Run` and makes each window from a default-idle-priority callback on the main loop, so `fontDPI`, called just before `Run`, queues the check as a `G_PRIORITY_HIGH` idle: it runs on the main thread after GTK's own start, before the first window. `TestFontDPIUnset` opens a real WebKitGTK page through `magpie_font_dpi` and needs a display (Xvfb).
|
||||
- Tests never touch a live agent config. The package's `TestMain` runs under `testenv`'s home of its own. A macOS test that shows windows runs them in a process of its own through `runAppKit` ([`appkit_darwin_test.go`](../../internal/gui/appkit_darwin_test.go)). AppKit and WebKit take their home from the account, not from HOME, so `runAppKit` gives them a temporary one with `CFFIXED_USER_HOME`; appearance, contrast and languages still come from the account. The test fails when that process leaves a folder in the real `~/Library/WebKit` or `~/Library/Caches`. Playwright tests serve `assets/` with isolated `/api` fixtures.
|
||||
- `POST /api/settings/codex-auto-review` accepts an empty value (Codex's own choice), `session` (the session's own model when it is one of magpie's; "Same as the session" in the picker), or an exact model/group ID in `provider.Served`, including unlisted providers. A known provider with an unknown or empty model name is rejected without changing the saved reviewer or catalog tag. Generic gateway request resolution remains permissive; it is not the validator for this setting. See `Handler` in [`api.go`](../../internal/gui/api.go) and `TestCodexAutoReviewSetting` in [`codex_auto_review_test.go`](../../internal/gui/codex_auto_review_test.go).
|
||||
- `POST /api/settings/codex-auto-review` accepts an empty value (Codex's own choice, or the session's model when Codex's sign-in is on a Free plan), `session` (the session's own model when it is one of magpie's; "Same as the session" in the picker), or an exact model/group ID in `provider.Served`, including unlisted providers. A known provider with an unknown or empty model name is rejected without changing the saved reviewer or catalog tag. Generic gateway request resolution remains permissive; it is not the validator for this setting. See `Handler` in [`api.go`](../../internal/gui/api.go) and `TestCodexAutoReviewSetting` in [`codex_auto_review_test.go`](../../internal/gui/codex_auto_review_test.go).
|
||||
- `Settings -> Sync and backup` and `/api/davsync/{action}` configure and run encrypted WebDAV, S3 or GitHub setup sync. They share the CLI's operations and expose credential presence, never the secrets. State, merge, failure and compatibility behavior are described in [Sync and backup](sync-backup.md).
|
||||
|
||||
`openModal` makes the background inert when an editor opens fresh, leaving
|
||||
|
||||
@@ -109,3 +109,44 @@ func TestCodexAutoReviewFollowsTheSession(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cybercaius on Discord: codex-auto-review, kept as the default for being
|
||||
// free on a ChatGPT sign-in (#1593), is not free on a Free plan. With
|
||||
// nothing picked and Codex signed in to one, the review follows the
|
||||
// session; on another plan, or one magpie can't read, it stays Codex's
|
||||
// pick, and a model the user picked is kept on any plan.
|
||||
func TestCodexAutoReviewOnAFreePlan(t *testing.T) {
|
||||
v1Home(t, `{"etag":"W/\"a\"","models":[{"slug":"gpt-6","base_instructions":"x"},{"slug":"gpt-8","base_instructions":"x","auto_review_model_override":"codex-auto-review"}]}`)
|
||||
plan := "free"
|
||||
was := SignInPlan
|
||||
SignInPlan = func() string { return plan }
|
||||
t.Cleanup(func() { SignInPlan = was })
|
||||
ms := []catalog.Model{
|
||||
{ID: "codex/gpt-6", Name: "GPT-6 · Codex"},
|
||||
{ID: "codex/gpt-8", Name: "GPT-8 · Codex"},
|
||||
{ID: "token/gpt-6.1-sol", Name: "GPT-6.1 Sol"},
|
||||
}
|
||||
check := func(what string, want map[string]any) {
|
||||
t.Helper()
|
||||
got := overrides(t, ms)
|
||||
for k, v := range want {
|
||||
if got[k] != v {
|
||||
t.Fatalf("%s: %s = %v, want %v (%v)", what, k, got[k], v, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
check("free", map[string]any{"codex/gpt-6": "none", "codex/gpt-8": "codex-auto-review", "token/gpt-6.1-sol": "token/gpt-6.1-sol"})
|
||||
if got := AutoReviewModel(); got != settings.CodexAutoReviewSession {
|
||||
t.Fatalf("free: in effect %q", got)
|
||||
}
|
||||
for _, plan = range []string{"plus", ""} {
|
||||
check("plan "+plan, map[string]any{"codex/gpt-6": "none", "codex/gpt-8": "codex-auto-review", "token/gpt-6.1-sol": "none"})
|
||||
}
|
||||
plan = "free"
|
||||
s := settings.Load()
|
||||
s.CodexAutoReview = "deepseek/deepseek-flash"
|
||||
if err := settings.Save(s); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
check("picked", map[string]any{"codex/gpt-6": "deepseek/deepseek-flash", "codex/gpt-8": "deepseek/deepseek-flash", "token/gpt-6.1-sol": "deepseek/deepseek-flash"})
|
||||
}
|
||||
|
||||
@@ -195,6 +195,7 @@ func entriesAt(ms []catalog.Model, after int, effort string) []any {
|
||||
own := CacheEntries()
|
||||
v1 := V1()
|
||||
work := settings.Load()
|
||||
autoReview := AutoReviewModel()
|
||||
var entries []any
|
||||
for i, m := range ms {
|
||||
if raw, ok := own[strings.TrimPrefix(m.ID, "codex/")]; ok && strings.HasPrefix(m.ID, "codex/") {
|
||||
@@ -206,7 +207,7 @@ func entriesAt(ms []catalog.Model, after int, effort string) []any {
|
||||
if v1 {
|
||||
Stamp(e)
|
||||
}
|
||||
AutoReview(e)
|
||||
AutoReview(e, autoReview)
|
||||
entries = append(entries, e)
|
||||
continue
|
||||
}
|
||||
@@ -216,7 +217,7 @@ func entriesAt(ms []catalog.Model, after int, effort string) []any {
|
||||
Shell: "unified_exec", Visibility: "list", InAPI: true, Priority: after + i + 1,
|
||||
ApplyPatch: "freeform", Tools: []string{}, Modalities: []string{"text"},
|
||||
Tiers: []tier{}, SearchTool: true, Parallel: true,
|
||||
AutoReview: work.CodexAutoReview,
|
||||
AutoReview: autoReview,
|
||||
}
|
||||
if e.AutoReview == settings.CodexAutoReviewSession {
|
||||
e.AutoReview = m.ID
|
||||
@@ -616,12 +617,34 @@ func unstamp(e map[string]any, was string) {
|
||||
// own are left as OpenAI gave them, so the review runs on the session's
|
||||
// model.
|
||||
|
||||
// AutoReview has one of Codex's own entries name the auto-review model the
|
||||
// user picked. With none picked, one magpie put there before — a magpie id,
|
||||
// SignInPlan is the plan of the ChatGPT account this machine's Codex is
|
||||
// signed in to, as its ID token names it ("free", "plus", "pro" …), ""
|
||||
// when it is unknown or Codex isn't signed in (provider.CodexSignInPlan).
|
||||
var SignInPlan func() string
|
||||
|
||||
// AutoReviewModel is the auto-review setting in effect:
|
||||
// settings.CodexAutoReview, but with nothing picked and Codex signed in
|
||||
// to a Free ChatGPT plan, the session's (settings.CodexAutoReviewSession).
|
||||
// Left to Codex the review runs on codex-auto-review, kept as the default
|
||||
// for being free on a ChatGPT sign-in (#1593, from a paid account); on a
|
||||
// Free plan it is not (cybercaius on Discord measured it spending the
|
||||
// plan's allowance), so there it follows the session as Codex's other
|
||||
// side calls do. A plan magpie can't read keeps Codex's pick.
|
||||
func AutoReviewModel() string {
|
||||
v := settings.Load().CodexAutoReview
|
||||
if v == "" && SignInPlan != nil && strings.EqualFold(strings.TrimSpace(SignInPlan()), "free") {
|
||||
return settings.CodexAutoReviewSession
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// AutoReview has one of Codex's own entries name the auto-review model in
|
||||
// effect, v (AutoReviewModel, read once for a whole list: it reads Codex's
|
||||
// sign-in). With none picked, one magpie put there before — a magpie id,
|
||||
// which has a "/" where OpenAI's slugs have none, kept in Codex's cache — is
|
||||
// taken out, and one OpenAI gave it is left.
|
||||
func AutoReview(e map[string]any) {
|
||||
if v := settings.Load().CodexAutoReview; v != "" && v != settings.CodexAutoReviewSession {
|
||||
func AutoReview(e map[string]any, v string) {
|
||||
if v != "" && v != settings.CodexAutoReviewSession {
|
||||
e["auto_review_model_override"] = v
|
||||
} else if was, _ := e["auto_review_model_override"].(string); strings.Contains(was, "/") {
|
||||
delete(e, "auto_review_model_override")
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -264,3 +268,33 @@ func TestAccountCapLetsAutoReviewThrough(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// On a Free ChatGPT plan codex-auto-review is not free (cybercaius on
|
||||
// Discord), so the account's usage cap holds it as any call.
|
||||
func TestAccountCapHoldsAutoReviewOnAFreePlan(t *testing.T) {
|
||||
codexSignedIn(t)
|
||||
home, _ := os.UserHomeDir()
|
||||
claims := func(m map[string]any) string {
|
||||
b, _ := json.Marshal(m)
|
||||
return "h." + base64.RawURLEncoding.EncodeToString(b) + ".s"
|
||||
}
|
||||
os.WriteFile(filepath.Join(home, ".codex", "auth.json"), mustJSON(map[string]any{"auth_mode": "chatgpt", "tokens": map[string]any{
|
||||
"id_token": claims(map[string]any{"email": "me@example.com", "https://api.openai.com/auth": map[string]any{"chatgpt_plan_type": "free"}}),
|
||||
"access_token": claims(map[string]any{"exp": time.Now().Add(time.Hour).Unix(), "who": "acct-1"}),
|
||||
"refresh_token": "r-acct-1", "account_id": "acct-1"}}), 0o600)
|
||||
provider.ForgetAccounts()
|
||||
b := newResetBackend(t)
|
||||
capUsage(t, map[string]float64{"me@example.com": 92})
|
||||
if err := provider.SetAccountCap("codex", "me@example.com", 90); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
srv := New()
|
||||
rec := httptest.NewRecorder()
|
||||
req := httptest.NewRequest("POST", CodexPath+"/responses", strings.NewReader(`{"model":"codex-auto-review","stream":true,"input":"review this"}`))
|
||||
req.Header.Set("Authorization", "Bearer chatgpt-token")
|
||||
req.Header.Set("chatgpt-account-id", "acct-1")
|
||||
srv.Handler().ServeHTTP(rec, req)
|
||||
if tried, _ := b.seen(); rec.Code != 429 || !strings.Contains(rec.Body.String(), "usage cap reached") || tried != "" {
|
||||
t.Errorf("free plan: %d %s tried %q", rec.Code, rec.Body.String(), tried)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1873,9 +1873,10 @@ func (s *Server) codexModels(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
// and the auto-review model the user picked (#938)
|
||||
autoReview := codexcat.AutoReviewModel()
|
||||
for _, m := range own {
|
||||
if o, ok := m.(map[string]any); ok {
|
||||
codexcat.AutoReview(o)
|
||||
codexcat.AutoReview(o, autoReview)
|
||||
}
|
||||
}
|
||||
// a Codex here for account failover alone, not connected to magpie,
|
||||
|
||||
@@ -39,13 +39,14 @@ func isReviewCall(kind, asked string) bool {
|
||||
return kind == "guardian" || asked == "codex-auto-review"
|
||||
}
|
||||
|
||||
// freeOnChatGPT says whether a ChatGPT sign-in's call on model is free,
|
||||
// counted in none of its usage windows: Codex's reviewer model,
|
||||
// codex-auto-review, since OpenAI made Auto-review free for every ChatGPT
|
||||
// sign-in on 2026-10-06 (#1593, hywang1230). A review run on another
|
||||
// model, or through an API key, is counted as any call.
|
||||
func freeOnChatGPT(model string) bool {
|
||||
return strings.EqualFold(strings.TrimSpace(model), "codex-auto-review")
|
||||
// freeOnChatGPT says whether a call on model by a ChatGPT account on plan
|
||||
// is free, counted in none of its usage windows: Codex's reviewer model,
|
||||
// codex-auto-review, since OpenAI made Auto-review free for ChatGPT
|
||||
// sign-ins on 2026-10-06 (#1593, hywang1230), but not on a Free plan,
|
||||
// where cybercaius on Discord measured it spending the allowance. A review
|
||||
// run on another model, or through an API key, is counted as any call.
|
||||
func freeOnChatGPT(model, plan string) bool {
|
||||
return strings.EqualFold(strings.TrimSpace(model), "codex-auto-review") && !strings.EqualFold(strings.TrimSpace(plan), "free")
|
||||
}
|
||||
|
||||
// codexMemoryStandIn is the model a Codex memory call goes to when magpie
|
||||
|
||||
@@ -645,7 +645,7 @@ func capHeld(p, acct provider.Provider, model string, now time.Time) *capHold {
|
||||
}
|
||||
a := acct.Account
|
||||
caps := provider.HoldCaps(p, a.Agent, a.User)
|
||||
if a.Agent == "codex" && freeOnChatGPT(model) {
|
||||
if a.Agent == "codex" && freeOnChatGPT(model, a.Plan) {
|
||||
// a call ChatGPT counts in no window spends nothing a usage cap
|
||||
// keeps (#1593); credits set not to be spent still hold it at
|
||||
// 100%, as nothing says the backend answers it there
|
||||
|
||||
@@ -19598,7 +19598,7 @@ function renderSettings() {
|
||||
["#codexTitlesRow", "Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own"],
|
||||
["#codexDescriptionsRow", "Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own"],
|
||||
["#codexPredictionsRow", "Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model"],
|
||||
["#codexAutoReviewRow", "Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort"],
|
||||
["#codexAutoReviewRow", "Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort; on a ChatGPT Free plan, where codex-auto-review isn’t free, unset follows the session"],
|
||||
["#codexMemoriesRow", "Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own"],
|
||||
["#loginRow", document.body.classList.contains("mac")
|
||||
? "Opens in the menu bar with no window. System Settings › General › Login Items lists it under App Background Activity, not Open at Login"
|
||||
|
||||
@@ -862,7 +862,7 @@ const I18N = {
|
||||
"Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "为每个会话起标题,是 Codex 单独发出的隐藏请求;跟随当前会话时用会话的模型,会话在 Codex 自带模型上时按 Codex 原样发送",
|
||||
"Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "为每个会话写简短描述,是 Codex 单独发出的隐藏请求;跟随当前会话时用会话的模型,会话在 Codex 自带模型上时按 Codex 原样发送",
|
||||
"Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "为输入框猜测你的下一条消息,每次都把整段对话重读一遍;跟随当前会话时用会话的模型",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Codex 的审批设为自动审批时,代你决定是否批准;由 Codex 决定时用 codex-auto-review,没有则用当前对话的模型(低推理)",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort; on a ChatGPT Free plan, where codex-auto-review isn’t free, unset follows the session": "Codex 的审批设为自动审批时,代你决定是否批准;由 Codex 决定时用 codex-auto-review,没有则用当前对话的模型(低推理);ChatGPT 免费版上 codex-auto-review 不免费,未设置时跟随当前会话",
|
||||
"Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "在后台把过去的会话整理成 Codex 的记忆;跟随当前会话时用会话的模型,会话在 Codex 自带模型上时用 gpt-5.6-terra 和 gpt-5.6-luna",
|
||||
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "已在系统设置的登录项里关闭,登录时不会打开 magpie",
|
||||
"Open Login Items": "打开登录项",
|
||||
@@ -4836,7 +4836,7 @@ const I18N = {
|
||||
"Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "為每個會話起標題,是 Codex 單獨發出的隱藏請求;跟隨目前工作階段時用工作階段的模型,工作階段在 Codex 自帶模型上時按 Codex 原樣傳送",
|
||||
"Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "為每個會話寫簡短描述,是 Codex 單獨發出的隱藏請求;跟隨目前工作階段時用工作階段的模型,工作階段在 Codex 自帶模型上時按 Codex 原樣傳送",
|
||||
"Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "為輸入框猜測你的下一則訊息,每次都把整段對話重讀一遍;跟隨目前工作階段時用工作階段的模型",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Codex 的審批設為自動審批時,代你決定是否批准;由 Codex 決定時用 codex-auto-review,沒有則用目前對話的模型(低推理)",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort; on a ChatGPT Free plan, where codex-auto-review isn’t free, unset follows the session": "Codex 的審批設為自動審批時,代你決定是否批准;由 Codex 決定時用 codex-auto-review,沒有則用目前對話的模型(低推理);ChatGPT 免費版上 codex-auto-review 不免費,未設定時跟隨目前工作階段",
|
||||
"Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "在背景把過去的會話整理成 Codex 的記憶;跟隨目前工作階段時用工作階段的模型,工作階段在 Codex 自帶模型上時用 gpt-5.6-terra 和 gpt-5.6-luna",
|
||||
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "已在系統設定的登入項目裡關閉,登入時不會開啟 magpie",
|
||||
"Open Login Items": "打開登入項目",
|
||||
@@ -8782,7 +8782,7 @@ const I18N = {
|
||||
"Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "各スレッドに題名を付ける、Codex 独自の隠れたリクエスト。セッションと同じなら、セッションのモデルで送られ、それが Codex 自身のモデルなら Codex が送るとおりに送られます",
|
||||
"Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "各スレッドの短い説明を書く、Codex 独自の隠れたリクエスト。セッションと同じなら、セッションのモデルで送られ、それが Codex 自身のモデルなら Codex が送るとおりに送られます",
|
||||
"Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "入力欄に次のメッセージを予測し、そのたびに会話全体を読み直します。セッションと同じなら、セッションのモデルで送られます",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Codex の承認が自動レビューのとき、あなたの代わりに承認を判断します。Codex に任せると codex-auto-review、なければ会話のモデル(低い推論)",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort; on a ChatGPT Free plan, where codex-auto-review isn’t free, unset follows the session": "Codex の承認が自動レビューのとき、あなたの代わりに承認を判断します。Codex に任せると codex-auto-review、なければ会話のモデル(低い推論)。ChatGPT の Free プランでは codex-auto-review が無料ではないため、未設定ならセッションと同じモデルを使います",
|
||||
"Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "過去のスレッドを Codex のメモリにバックグラウンドでまとめます。セッションと同じなら、セッションのモデルで、それが Codex 自身のモデルなら gpt-5.6-terra と gpt-5.6-luna で",
|
||||
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "システム設定のログイン項目でオフになっているため、ログイン時に magpie は開きません",
|
||||
"Open Login Items": "ログイン項目を開く",
|
||||
@@ -12742,7 +12742,7 @@ const I18N = {
|
||||
"Names each thread in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "Benennt jeden Thread in einer eigenen versteckten Anfrage; bei „Wie die Sitzung“ geht sie auf das Modell der Sitzung, wie Codex sie sendet, wenn es ein eigenes von Codex ist",
|
||||
"Writes each thread’s short description in a hidden request of its own; same as the session, it goes on the session’s model, as Codex sends it when that is one of Codex’s own": "Schreibt die Kurzbeschreibung jedes Threads in einer eigenen versteckten Anfrage; bei „Wie die Sitzung“ geht sie auf das Modell der Sitzung, wie Codex sie sendet, wenn es ein eigenes von Codex ist",
|
||||
"Guesses your next message for the composer, reading the whole conversation again each time; same as the session, it goes on the session’s model": "Errät Ihre nächste Nachricht fürs Eingabefeld und liest dafür jedes Mal das ganze Gespräch neu; bei „Wie die Sitzung“ mit dem Modell der Sitzung",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort": "Entscheidet eine Freigabe an Ihrer Stelle, wenn Codex’ Freigaben auf Auto-Review stehen; „Wie Codex es wählt“ ist codex-auto-review, sonst das Modell des Gesprächs mit wenig Reasoning",
|
||||
"Decides an approval in your place when Codex’s approvals are on auto-review; Codex’s own pick is codex-auto-review, else the conversation’s model at low effort; on a ChatGPT Free plan, where codex-auto-review isn’t free, unset follows the session": "Entscheidet eine Freigabe an Ihrer Stelle, wenn Codex’ Freigaben auf Auto-Review stehen; „Wie Codex es wählt“ ist codex-auto-review, sonst das Modell des Gesprächs mit wenig Reasoning; im kostenlosen ChatGPT-Plan, in dem codex-auto-review nicht kostenlos ist, folgt es ohne Auswahl der Sitzung",
|
||||
"Writes Codex’s memories of past threads, in the background; same as the session, on the session’s model, or on gpt-5.6-terra and gpt-5.6-luna when that is one of Codex’s own": "Schreibt im Hintergrund Codex’ Erinnerungen an frühere Threads; bei „Wie die Sitzung“ mit dem Modell der Sitzung, mit gpt-5.6-terra und gpt-5.6-luna, wenn es ein eigenes von Codex ist",
|
||||
"Switched off in System Settings’ Login Items, so magpie won’t open at login": "In den Systemeinstellungen unter „Anmeldeobjekte“ ausgeschaltet, daher öffnet sich magpie bei der Anmeldung nicht",
|
||||
"Open Login Items": "Anmeldeobjekte öffnen",
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/yetone/magpie/internal/catalog"
|
||||
"github.com/yetone/magpie/internal/codexcat"
|
||||
"github.com/yetone/magpie/internal/testenv"
|
||||
)
|
||||
|
||||
@@ -630,3 +631,19 @@ func TestClaudeCredentialsMarshalLeavesTheBlob(t *testing.T) {
|
||||
t.Fatalf("the blob was written into: %v", o)
|
||||
}
|
||||
}
|
||||
|
||||
// CodexSignInPlan reads the plan from Codex's own sign-in, and codexcat
|
||||
// asks it there (the auto-review default on a Free plan, cybercaius).
|
||||
func TestCodexSignInPlan(t *testing.T) {
|
||||
home := signIn(t)
|
||||
if got := CodexSignInPlan(); got != "pro" {
|
||||
t.Fatalf("plan %q", got)
|
||||
}
|
||||
if codexcat.SignInPlan == nil || codexcat.SignInPlan() != "pro" {
|
||||
t.Fatal("codexcat doesn't read the sign-in's plan")
|
||||
}
|
||||
os.Remove(filepath.Join(home, ".codex", "auth.json"))
|
||||
if got := CodexSignInPlan(); got != "" {
|
||||
t.Fatalf("signed out: plan %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -524,7 +524,7 @@ func buildCodexListTag(kind string) string {
|
||||
ms = append(ms, catalog.Model{ID: "~compact", Context: n})
|
||||
}
|
||||
// and the model Codex's auto-review runs on (#938)
|
||||
if v := settings.Load().CodexAutoReview; v != "" {
|
||||
if v := codexcat.AutoReviewModel(); v != "" {
|
||||
ms = append(ms, catalog.Model{ID: "~autoreview:" + v})
|
||||
}
|
||||
// and the effort new sessions start at, which magpie's models take as
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/yetone/magpie/internal/appdir"
|
||||
"github.com/yetone/magpie/internal/codexcat"
|
||||
"github.com/yetone/magpie/internal/edit"
|
||||
"github.com/yetone/magpie/internal/filelock"
|
||||
"github.com/yetone/magpie/internal/filememo"
|
||||
@@ -702,6 +703,18 @@ func liveLogin(agent string) (savedLogin, bool) {
|
||||
return savedLogin{}, false
|
||||
}
|
||||
|
||||
// CodexSignInPlan is the plan of the ChatGPT account this machine's Codex
|
||||
// is signed in to, as its ID token's chatgpt_plan_type names it ("free",
|
||||
// "plus", "pro" …), "" when Codex isn't signed in or it can't be read.
|
||||
// Codex's auto-review follows the session on a Free plan by default
|
||||
// (codexcat.AutoReviewModel).
|
||||
func CodexSignInPlan() string {
|
||||
l, _ := liveLogin("codex")
|
||||
return l.Plan
|
||||
}
|
||||
|
||||
func init() { codexcat.SignInPlan = CodexSignInPlan }
|
||||
|
||||
// codexLoginIn is the ChatGPT account Codex is signed in to in its folder
|
||||
// home, as Codex keeps it there (auth.json, or the keychain item named by
|
||||
// the folder).
|
||||
|
||||
Reference in New Issue
Block a user