proxy_failover

Global Gemini-proxy outage circuit for owner-quota GPT failover.

proxy_failover.is_local_gemini_proxy_url(url)

Return whether a chat URL targets Stargazer’s local proxy.

Return type:

bool

Parameters:

url (str | None)

async proxy_failover.gpt_failover_until(redis)

Return the active global GPT failover deadline, if any.

Return type:

float | None

Parameters:

redis (Any)

async proxy_failover.record_proxy_success(redis)

Clear a pending first strike after a confirmed local-proxy success.

Return type:

None

Parameters:

redis (Any)

async proxy_failover.record_proxy_exhaustion(redis)

Record one global 20-retry exhaustion and open GPT after strike two.

Return type:

bool

Parameters:

redis (Any)