fix(proxy): ensure OpenAI tool call streaming emits proper delta chunks and increase body limit
- Emit tool call id+name in first SSE delta and arguments in subsequent deltas - Split large tool arguments into 1000-char chunks to prevent framing issues - Set FastifyAdapter bodyLimit to 10MB to handle large payloads - Add TDD tests for tool call streaming verification
This commit is contained in:
1 parent
04014b8c7d
commit
69e455a565
3 files changed
+217
-8
No files matched your search
+7
-3
@@ -22,9 +22,13 @@ export async function bootstrapNestServer(config: ProxyConfig): Promise<boolean>
|
||||
setServerConfig(config);
|
||||
|
||||
try {
|
||||
app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter(), {
|
||||
logger: ['error', 'warn', 'log'],
|
||||
});
|
||||
app = await NestFactory.create<NestFastifyApplication>(
|
||||
AppModule,
|
||||
new FastifyAdapter({ bodyLimit: 10 * 1024 * 1024 }),
|
||||
{
|
||||
logger: ['error', 'warn', 'log'],
|
||||
},
|
||||
);
|
||||
|
||||
// Enable CORS
|
||||
app.enableCors();
|
||||
|
||||
Reference in new issue
Block a user