Skip to content

[codex] Raise MiniMax instant admit threshold#544

Merged
jahooma merged 1 commit intomainfrom
jahooma/minimax-instant-threshold
Apr 25, 2026
Merged

[codex] Raise MiniMax instant admit threshold#544
jahooma merged 1 commit intomainfrom
jahooma/minimax-instant-threshold

Conversation

@brandonkachen
Copy link
Copy Markdown
Collaborator

Raises the freebuff MiniMax M2.7 instant-admit capacity from 200 to 1000. This lets more MiniMax users skip the waiting room before FIFO backpressure starts. The change is limited to the server-side free-session config knob, so CLI-facing shared model definitions are unchanged. Validated with bun test web/src/server/free-session/__tests__/config.test.ts using dummy required env vars for config initialization.

@jahooma jahooma marked this pull request as ready for review April 25, 2026 05:50
@jahooma jahooma merged commit 2bd8f2a into main Apr 25, 2026
19 checks passed
@jahooma jahooma deleted the jahooma/minimax-instant-threshold branch April 25, 2026 05:51
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 25, 2026

Greptile Summary

This PR bumps the minimax/minimax-m2.7 instant-admit capacity constant from 200 to 1000, letting more MiniMax users skip the waiting room before FIFO backpressure kicks in. The change is a single-line edit confined to the server-side free-session config; no shared/CLI-facing code is touched.

Confidence Score: 5/5

Safe to merge — single numeric constant change with no logic impact.

The only finding is a P2 suggestion (env-var–driven capacity) that doesn't affect correctness. No P0/P1 issues were found.

No files require special attention.

Important Files Changed

Filename Overview
web/src/server/free-session/config.ts Raises minimax/minimax-m2.7 instant-admit capacity from 200 → 1000; all other logic is unchanged.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: web/src/server/free-session/config.ts
Line: 50-53

Comment:
**Consider env-var–driven capacity for zero-deploy tuning**

The rest of the file already reads tuneable knobs from `env` (e.g. `FREEBUFF_SESSION_LENGTH_MS`, `FREEBUFF_SESSION_GRACE_MS`). Driving `INSTANT_ADMIT_CAPACITY` the same way would let you raise or lower the threshold without a code deploy — the same benefit the PR description cites for keeping this server-side in the first place.

```suggestion
const INSTANT_ADMIT_CAPACITY: Record<string, number> = {
  'z-ai/glm-5.1': env.FREEBUFF_INSTANT_ADMIT_ZAI_GLM ?? 50,
  'minimax/minimax-m2.7': env.FREEBUFF_INSTANT_ADMIT_MINIMAX_M2_7 ?? 1000,
}
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Raise MiniMax instant admit threshold" | Re-trigger Greptile

Comment on lines 50 to 53
const INSTANT_ADMIT_CAPACITY: Record<string, number> = {
'z-ai/glm-5.1': 50,
'minimax/minimax-m2.7': 200,
'minimax/minimax-m2.7': 1000,
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Consider env-var–driven capacity for zero-deploy tuning

The rest of the file already reads tuneable knobs from env (e.g. FREEBUFF_SESSION_LENGTH_MS, FREEBUFF_SESSION_GRACE_MS). Driving INSTANT_ADMIT_CAPACITY the same way would let you raise or lower the threshold without a code deploy — the same benefit the PR description cites for keeping this server-side in the first place.

Suggested change
const INSTANT_ADMIT_CAPACITY: Record<string, number> = {
'z-ai/glm-5.1': 50,
'minimax/minimax-m2.7': 200,
'minimax/minimax-m2.7': 1000,
}
const INSTANT_ADMIT_CAPACITY: Record<string, number> = {
'z-ai/glm-5.1': env.FREEBUFF_INSTANT_ADMIT_ZAI_GLM ?? 50,
'minimax/minimax-m2.7': env.FREEBUFF_INSTANT_ADMIT_MINIMAX_M2_7 ?? 1000,
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: web/src/server/free-session/config.ts
Line: 50-53

Comment:
**Consider env-var–driven capacity for zero-deploy tuning**

The rest of the file already reads tuneable knobs from `env` (e.g. `FREEBUFF_SESSION_LENGTH_MS`, `FREEBUFF_SESSION_GRACE_MS`). Driving `INSTANT_ADMIT_CAPACITY` the same way would let you raise or lower the threshold without a code deploy — the same benefit the PR description cites for keeping this server-side in the first place.

```suggestion
const INSTANT_ADMIT_CAPACITY: Record<string, number> = {
  'z-ai/glm-5.1': env.FREEBUFF_INSTANT_ADMIT_ZAI_GLM ?? 50,
  'minimax/minimax-m2.7': env.FREEBUFF_INSTANT_ADMIT_MINIMAX_M2_7 ?? 1000,
}
```

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants