ai.internal._gcp_quota_project_id

(internal) Resolves the quota/billing project for the `x-goog-user-project` header, matching google-auth's `Credentials.apply`: `GOOGLE_CLOUD_QUOTA_PROJECT` always wins, then the credential document's `quota_project_id`.

Reference version

Signature

function ai.internal._gcp_quota_project_id(credentials_json: string | null) -> string | null

(internal) Resolves the quota/billing project for the x-goog-user-project header, matching google-auth's Credentials.apply: GOOGLE_CLOUD_QUOTA_PROJECT always wins, then the credential document's quota_project_id.

Discovery is best-effort and never fails.

Returns

The quota project id, or null when it is not discoverable.

Source:<builtin>/ai/ns_internal/auth.bamlbytes 24142521