Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/server/free-session/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function getSessionGraceMs(): number {
*/
const INSTANT_ADMIT_CAPACITY: Record<string, number> = {
'z-ai/glm-5.1': 50,
'minimax/minimax-m2.7': 200,
'minimax/minimax-m2.7': 1000,
}
Comment on lines 50 to 53
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.


export function getInstantAdmitCapacity(id: string): number {
Expand Down
Loading