AiProxyContextResolver typedef

AiProxyContextResolver = ({Map<String, String> headers, String url})? Function()

Resolves (functionUrl, authHeaders) for a POST to the ai-proxy Edge Function using the currently active Supabase session. Returns null when the user isn't signed in. Extracted from listModelsViaProxy so the Supabase singleton access is isolated from the parsing/HTTP logic, which is unit-testable on its own.

Implementation

typedef AiProxyContextResolver =
    ({String url, Map<String, String> headers})? Function();