fix(ai): forwarded advisor silence flag over pi-native
Added acceptEmptyResponse to the pi-native gateway option allow-list so a Google advisor on the auth-gateway transport still accepts a silent STOP server-side instead of exhausting the empty-response retries. Added a pi-native parseRequest regression asserting the option survives the wire.
This commit is contained in:
@@ -78,6 +78,7 @@ const ALLOWED_OPTION_KEYS: ReadonlySet<keyof SimpleStreamOptions> = new Set([
|
||||
"preferWebsockets",
|
||||
"openrouterVariant",
|
||||
"loopGuard",
|
||||
"acceptEmptyResponse",
|
||||
] as const satisfies readonly (keyof SimpleStreamOptions)[]);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -145,6 +145,15 @@ describe("pi-native parseRequest", () => {
|
||||
expect(parsed.options.loopGuard).toEqual({ enabled: false });
|
||||
});
|
||||
|
||||
it("forwards acceptEmptyResponse so a passive Google advisor can accept silence server-side", () => {
|
||||
const parsed = parseRequest({
|
||||
modelId: "google/gemini-3.6-flash",
|
||||
context: baseContext,
|
||||
options: { acceptEmptyResponse: true },
|
||||
});
|
||||
expect(parsed.options.acceptEmptyResponse).toBe(true);
|
||||
});
|
||||
|
||||
it("forwards an explicit statefulResponses disablement to the native stream", () => {
|
||||
const parsed = parseRequest({
|
||||
modelId: "openai/gpt-5",
|
||||
|
||||
Reference in New Issue
Block a user