Commit 32c89a5
committed
docs(h2o): record the rename hook's two scope limits
Review correctly pointed out that only the async path is covered. The
@client decorator dispatches async_pre_call_deployment_hook from its
async wrapper only; the sync wrapper goes straight to the original
function. My earlier claim that both completion and acompletion are
covered was too broad.
It does not affect how this hook is deployed: it is registered only in
the proxy config, and the proxy maps /chat/completions to acompletion,
so all proxied traffic is async. Recorded anyway so nobody assumes an
in-process sync caller is covered.
Also records the second limit: the predicate reads merged kwargs and so
cannot tell a deployment-configured max_completion_tokens from a
caller-supplied one, meaning a request sending BOTH fields to a
max_tokens-native deployment is rewritten. Logic left as-is
deliberately; the alternative narrows a real Azure case, and the
reported traffic sends max_tokens alone.1 parent cdf049d commit 32c89a5
1 file changed
Lines changed: 20 additions & 0 deletions
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
| |||
0 commit comments