Repository navigation
Commit 7a9f2a0
committed
fix: add missing compat schema keys and session-affinity header injection to transport adapter
Two issues with model compat configuration:
1. ModelCompatSchema in zod-schema.core.ts was missing 8 runtime-supported
compat keys (sendSessionAffinityHeaders, sendSessionIdHeader,
supportsEagerToolInputStreaming, supportsLongCacheRetention,
cacheControlFormat, zaiToolStream, openRouterRouting,
vercelGatewayRouting). These are defined in ModelCompatConfig and used
throughout the runtime, but because the Zod schema uses .strict() they
were silently rejected during config validation.
2. The boundary-aware transport adapter (openai-transport-stream.ts) was
missing session-affinity header injection that only the direct adapter
had. Since the transport adapter handles all real chat turns, the
sendSessionAffinityHeaders compat flag was effectively dead code.
Added sessionId param to createOpenAICompletionsClient and
buildOpenAICompletionsClientConfig, and pass options?.sessionId
through from the call site in createOpenAICompletionsTransportStreamFn.1 parent 73e6a62 commit 7a9f2a0
2 files changed
Lines changed: 84 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2669 | 2669 | | |
2670 | 2670 | | |
2671 | 2671 | | |
| 2672 | + | |
2672 | 2673 | | |
2673 | | - | |
| 2674 | + | |
2674 | 2675 | | |
2675 | 2676 | | |
2676 | 2677 | | |
| |||
2709 | 2710 | | |
2710 | 2711 | | |
2711 | 2712 | | |
| 2713 | + | |
2712 | 2714 | | |
2713 | 2715 | | |
2714 | 2716 | | |
2715 | 2717 | | |
2716 | 2718 | | |
2717 | 2719 | | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
2718 | 2725 | | |
2719 | 2726 | | |
2720 | 2727 | | |
| |||
2777 | 2784 | | |
2778 | 2785 | | |
2779 | 2786 | | |
2780 | | - | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
2781 | 2794 | | |
2782 | 2795 | | |
2783 | 2796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
249 | 318 | | |
250 | 319 | | |
251 | 320 | | |
| |||
0 commit comments