mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 23:22:09 +03:00
feat(sse): Cursor plan images via Agent CLI (IMAGE_PROVIDERS.cursor) (#10842)
Merged — locally validated (60/60 combined image-generation tests, typecheck:core clean, complexity/cognitive/file-size/changelog gates green, small rebaseline for the combined imageRegistry.ts growth).
This commit is contained in:
committed by
GitHub
parent
db7c3abaf6
commit
bbcfb730ca
@@ -31,6 +31,7 @@ import { getSpecialtyModelsResponse } from "@/app/api/v1/_shared/specialtyCatalo
|
||||
import { enforceClientApiRouteAuth } from "@/shared/utils/clientApiRouteAuth";
|
||||
import { runWithCallLogApiKeyContext } from "@/lib/usage/callLogApiKeyContext";
|
||||
import { executeImageWithCredentialFallback } from "@/sse/services/imageCredentialRetry";
|
||||
import { AUTHZ_HEADER_PEER_LOCALITY } from "@/server/authz/headers";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
@@ -290,6 +291,12 @@ async function postHandler(request, context) {
|
||||
...(isCustomModel && { resolvedProvider: provider }),
|
||||
signal: request.signal,
|
||||
clientHeaders: publicBaseUrlHeaders(request.headers),
|
||||
// Trusted "loopback"|"lan"|"remote" verdict stamped by the authz
|
||||
// pipeline from the real TCP peer (never the spoofable Host
|
||||
// header). Only the spawn-capable cursor-agent-image provider
|
||||
// consumes this (Hard Rules #15 + #17) — every other image
|
||||
// provider ignores it.
|
||||
peerLocality: request.headers.get(AUTHZ_HEADER_PEER_LOCALITY),
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user