Commit 33b444d
committed
fix(anthropic): pdf-native-providers reuses resolveAnthropicMessagesUrl
Greptile flagged two issues with the inline URL build:
P1 (real bug): the chain used `??` instead of `||`, so a whitespace-only
ANTHROPIC_BASE_URL trimmed to "" passed nullish-checks and produced a
relative `/v1/messages` URL that fetch() can't resolve.
P2 (pre-existing): the inline path always appended `/v1/messages`, so a
proxy URL ending in `/v1` (common with LiteLLM) would hit `/v1/v1/messages`.
Both fixed by reusing the canonical resolveAnthropicMessagesUrl helper —
single precedence chain, single `/v1` suffix logic, no duplication.1 parent c62881c commit 33b444d
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 66 | + | |
| 67 | + | |
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
| |||
0 commit comments