MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / get_antigravity_switch_credential_enabled

Function get_antigravity_switch_credential_enabled

config.py:358–373  ·  view source on GitHub ↗

Get antigravity switch credential setting. 控制antigravity在重试时是否切换凭证。 禁用时会持续使用当前凭证,直到该凭证对当前模型进入CD或被禁用。 Environment variable: ANTIGRAVITY_SWITCH_CREDENTIAL Database config key: antigravity_switch_credential_enabled Default: False

()

Source from the content-addressed store, hash-verified

356
357
358async def get_antigravity_switch_credential_enabled() -> bool:
359 """
360 Get antigravity switch credential setting.
361
362 控制antigravity在重试时是否切换凭证。
363 禁用时会持续使用当前凭证,直到该凭证对当前模型进入CD或被禁用。
364
365 Environment variable: ANTIGRAVITY_SWITCH_CREDENTIAL
366 Database config key: antigravity_switch_credential_enabled
367 Default: False
368 """
369 env_value = os.getenv("ANTIGRAVITY_SWITCH_CREDENTIAL")
370 if env_value:
371 return env_value.lower() in ("true", "1", "yes", "on")
372
373 return bool(await get_config_value("antigravity_switch_credential_enabled", False))
374
375
376async def get_oauth_proxy_url() -> str:

Callers

nothing calls this directly

Calls 1

get_config_valueFunction · 0.85

Tested by

no test coverage detected