Commit ef493df
fix(jd): bump output token cap to 6000 for dense JDs
Routine n8n-style JDs with 40+ hard skills + 10+ must-haves + 10+
nice-to-haves + a verbose benefits block pack the LLM's structured
JSON output close to the previous 4000-token ceiling. The auto-retry
safety net caught the long tail but at the cost of a doubled
end-to-end parse latency on those JDs (one truncated call + one
retry).
Bumped jd_llm_parser_service.parse's default max_completion_tokens
from 4000 -> 6000 so dense JDs land in a single call. max_output_
tokens is a CEILING not a reservation — short JDs (the typical
case) cost exactly the same.
Input side is unchanged: there's no explicit input cap at this
layer; the only real bound is the model's context window (~128k
tokens for gpt-5.4-mini). Even a 5000-word JD is ~7k input tokens,
nowhere near that limit.
Companion to the next commit's frontend JD unification (paste /
upload / load-from-search ALL route through this parser via the
existing /workspace/job-description/upload endpoint), which makes
dense JDs the routine path rather than an edge case worth burning
a retry on.
Test ``test_jd_parser_requests_generous_budget_and_enables_retry``
updated from ``>= 4000`` to ``>= 6000`` to lock the new floor.
7/7 jd_llm_parser tests pass. Ruff clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2145824 commit ef493df
2 files changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
203 | 214 | | |
204 | | - | |
| 215 | + | |
205 | 216 | | |
206 | 217 | | |
207 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | | - | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
| |||
0 commit comments