mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 23:21:27 -07:00
Merge branch 'main' into akkr/subagents-policy
This commit is contained in:
@@ -121,6 +121,7 @@ jobs:
|
||||
'area/security',
|
||||
'area/platform',
|
||||
'area/extensions',
|
||||
'area/documentation',
|
||||
'area/unknown'
|
||||
];
|
||||
const labelNames = labels.map(label => label.name).filter(name => allowedLabels.includes(name));
|
||||
@@ -255,6 +256,14 @@ jobs:
|
||||
"Issues with a specific extension."
|
||||
"Feature request for the extension ecosystem."
|
||||
|
||||
area/documentation
|
||||
- Description: Issues related to user-facing documentation and other content on the documentation website.
|
||||
- Example Issues:
|
||||
"A typo in a README file."
|
||||
"DOCS: A command is not working as described in the documentation."
|
||||
"A request for a new documentation page."
|
||||
"Instructions missing for skills feature"
|
||||
|
||||
area/unknown
|
||||
- Description: Issues that do not clearly fit into any other defined area/ category, or where information is too limited to make a determination. Use this when no other area is appropriate.
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
|
||||
echo '🔍 Finding issues missing area labels...'
|
||||
NO_AREA_ISSUES="$(gh issue list --repo "${GITHUB_REPOSITORY}" \
|
||||
--search 'is:open is:issue -label:area/core -label:area/agent -label:area/enterprise -label:area/non-interactive -label:area/security -label:area/platform -label:area/extensions -label:area/unknown' --limit 100 --json number,title,body)"
|
||||
--search 'is:open is:issue -label:area/core -label:area/agent -label:area/enterprise -label:area/non-interactive -label:area/security -label:area/platform -label:area/extensions -label:area/documentation -label:area/unknown' --limit 100 --json number,title,body)"
|
||||
|
||||
echo '🔍 Finding issues missing kind labels...'
|
||||
NO_KIND_ISSUES="$(gh issue list --repo "${GITHUB_REPOSITORY}" \
|
||||
@@ -204,6 +204,7 @@ jobs:
|
||||
Categorization Guidelines (Area):
|
||||
area/agent: Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality
|
||||
area/core: User Interface, OS Support, Core Functionality
|
||||
area/documentation: End-user and contributor-facing documentation, website-related
|
||||
area/enterprise: Telemetry, Policy, Quota / Licensing
|
||||
area/extensions: Gemini CLI extensions capability
|
||||
area/non-interactive: GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automation
|
||||
|
||||
@@ -4,6 +4,10 @@ To use Gemini CLI, you'll need to authenticate with Google. This guide helps you
|
||||
quickly find the best way to sign in based on your account type and how you're
|
||||
using the CLI.
|
||||
|
||||
> **Note:** Looking for a high-level comparison of all available subscriptions?
|
||||
> To compare features and find the right quota for your needs, see our
|
||||
> [Plans page](/plans/).
|
||||
|
||||
For most users, we recommend starting Gemini CLI and logging in with your
|
||||
personal Google account.
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ When you encounter that limit, you’ll be given the option to switch to Gemini
|
||||
2.5 Pro, upgrade for higher limits, or stop. You’ll also be told when your usage
|
||||
limit resets and Gemini 3 Pro can be used again.
|
||||
|
||||
> **Note:** Looking to upgrade for higher limits? To compare subscription
|
||||
> options and find the right quota for your needs, see our
|
||||
> [Plans page](/plans/).
|
||||
|
||||
Similarly, when you reach your daily usage limit for Gemini 2.5 Pro, you’ll see
|
||||
a message prompting fallback to Gemini 2.5 Flash.
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
# Gemini CLI: Quotas and pricing
|
||||
|
||||
Gemini CLI offers a generous free tier that covers many individual developers'
|
||||
use cases. For enterprise or professional usage, or if you need higher limits,
|
||||
use cases. For enterprise or professional usage, or if you need increased quota,
|
||||
several options are available depending on your authentication account type.
|
||||
|
||||
See [privacy and terms](./tos-privacy.md) for details on the Privacy Policy and
|
||||
Terms of Service.
|
||||
For a high-level comparison of available subscriptions and to select the right
|
||||
quota for your needs, see the [Plans page](/plans/).
|
||||
|
||||
> **Note:** Published prices are list price; additional negotiated commercial
|
||||
> discounting may apply.
|
||||
## Overview
|
||||
|
||||
This article outlines the specific quotas and pricing applicable to Gemini CLI
|
||||
when using different authentication methods.
|
||||
@@ -23,10 +22,11 @@ Generally, there are three categories to choose from:
|
||||
|
||||
## Free usage
|
||||
|
||||
Your journey begins with a generous free tier, perfect for experimentation and
|
||||
light use.
|
||||
Access to Gemini CLI begins with a generous free tier, perfect for
|
||||
experimentation and light use.
|
||||
|
||||
Your free usage limits depend on your authorization type.
|
||||
Your free usage is governed by the following limits, which depend on your
|
||||
authorization type.
|
||||
|
||||
### Log in with Google (Gemini Code Assist for individuals)
|
||||
|
||||
@@ -78,14 +78,12 @@ Gemini CLI by upgrading to one of the following subscriptions:
|
||||
Learn more at
|
||||
[Gemini Code Assist Quotas and Limits](https://developers.google.com/gemini-code-assist/resources/quotas)
|
||||
|
||||
- [Purchase a Gemini Code Assist Subscription through Google Cloud ](https://cloud.google.com/gemini/docs/codeassist/overview)
|
||||
by signing up in the Google Cloud console. Learn more at
|
||||
[Set up Gemini Code Assist](https://cloud.google.com/gemini/docs/discover/set-up-gemini).
|
||||
- [Purchase a Gemini Code Assist Subscription through Google Cloud](https://cloud.google.com/gemini/docs/codeassist/overview).
|
||||
|
||||
Quotas and pricing are based on a fixed price subscription with assigned
|
||||
license seats. For predictable costs, you can sign in with Google.
|
||||
|
||||
This includes:
|
||||
This includes the following request limits:
|
||||
- Gemini Code Assist Standard edition:
|
||||
- 1500 model requests / user / day
|
||||
- 120 model requests / user / minute
|
||||
@@ -106,18 +104,27 @@ recommended path for uninterrupted access.
|
||||
|
||||
To do this, log in using a Gemini API key or Vertex AI.
|
||||
|
||||
- Vertex AI (Regular Mode):
|
||||
- Quota: Governed by a dynamic shared quota system or pre-purchased
|
||||
provisioned throughput.
|
||||
- Cost: Based on model and token usage.
|
||||
### Vertex AI (regular mode)
|
||||
|
||||
An enterprise-grade platform for building, deploying, and managing AI models,
|
||||
including Gemini. It offers enhanced security, data governance, and integration
|
||||
with other Google Cloud services.
|
||||
|
||||
- Quota: Governed by a dynamic shared quota system or pre-purchased provisioned
|
||||
throughput.
|
||||
- Cost: Based on model and token usage.
|
||||
|
||||
Learn more at
|
||||
[Vertex AI Dynamic Shared Quota](https://cloud.google.com/vertex-ai/generative-ai/docs/resources/dynamic-shared-quota)
|
||||
and [Vertex AI Pricing](https://cloud.google.com/vertex-ai/pricing).
|
||||
|
||||
- Gemini API key:
|
||||
- Quota: Varies by pricing tier.
|
||||
- Cost: Varies by pricing tier and model/token usage.
|
||||
### Gemini API key
|
||||
|
||||
Ideal for developers who want to quickly build applications with the Gemini
|
||||
models. This is the most direct way to use the models.
|
||||
|
||||
- Quota: Varies by pricing tier.
|
||||
- Cost: Varies by pricing tier and model/token usage.
|
||||
|
||||
Learn more at
|
||||
[Gemini API Rate Limits](https://ai.google.dev/gemini-api/docs/rate-limits),
|
||||
@@ -125,7 +132,8 @@ Learn more at
|
||||
|
||||
It’s important to highlight that when using an API key, you pay per token/call.
|
||||
This can be more expensive for many small calls with few tokens, but it's the
|
||||
only way to ensure your workflow isn't interrupted by quota limits.
|
||||
only way to ensure your workflow isn't interrupted by reaching a limit on your
|
||||
quota.
|
||||
|
||||
## Gemini for workspace plans
|
||||
|
||||
@@ -135,12 +143,12 @@ Flow video editor). These plans do not apply to the API usage which powers the
|
||||
Gemini CLI. Supporting these plans is under active consideration for future
|
||||
support.
|
||||
|
||||
## Check usage and quota
|
||||
## Check usage and limits
|
||||
|
||||
You can check your current token usage and quota information using the
|
||||
You can check your current token usage and applicable limits using the
|
||||
`/stats model` command. This command provides a snapshot of your current
|
||||
session's token usage, as well as your overall quota and usage for the supported
|
||||
models.
|
||||
session's token usage, as well as information about the limits associated with
|
||||
your current quota.
|
||||
|
||||
For more information on the `/stats` command and its subcommands, see the
|
||||
[Command Reference](../../reference/commands.md#stats).
|
||||
@@ -149,17 +157,16 @@ A summary of model usage is also presented on exit at the end of a session.
|
||||
|
||||
## Tips to avoid high costs
|
||||
|
||||
When using a Pay as you Go API key, be mindful of your usage to avoid unexpected
|
||||
When using a pay-as-you-go plan, be mindful of your usage to avoid unexpected
|
||||
costs.
|
||||
|
||||
- Don't blindly accept every suggestion, especially for computationally
|
||||
intensive tasks like refactoring large codebases.
|
||||
- Be intentional with your prompts and commands. You are paying per call, so
|
||||
think about the most efficient way to get the job done.
|
||||
|
||||
## Gemini API vs. Vertex
|
||||
|
||||
- Gemini API (gemini developer api): This is the fastest way to use the Gemini
|
||||
models directly.
|
||||
- Vertex AI: This is the enterprise-grade platform for building, deploying, and
|
||||
managing Gemini models with specific security and control requirements.
|
||||
- **Be selective with suggestions**: Before accepting a suggestion, especially
|
||||
for a computationally intensive task like refactoring a large codebase,
|
||||
consider if it's the most cost-effective approach.
|
||||
- **Use precise prompts**: You are paying per call, so think about the most
|
||||
efficient way to get your desired result. A well-crafted prompt can often get
|
||||
you the answer you need in a single call, rather than multiple back-and-forth
|
||||
interactions.
|
||||
- **Monitor your usage**: Use the `/stats model` command to track your token
|
||||
usage during a session. This can help you stay aware of your spending in real
|
||||
time.
|
||||
|
||||
@@ -49,6 +49,7 @@ import type {
|
||||
ToolOutputMaskingEvent,
|
||||
KeychainAvailabilityEvent,
|
||||
TokenStorageInitializationEvent,
|
||||
StartupStatsEvent,
|
||||
} from '../types.js';
|
||||
import { EventMetadataKey } from './event-metadata-key.js';
|
||||
import type { Config } from '../../config/config.js';
|
||||
@@ -117,6 +118,7 @@ export enum EventNames {
|
||||
TOKEN_STORAGE_INITIALIZATION = 'token_storage_initialization',
|
||||
CONSECA_POLICY_GENERATION = 'conseca_policy_generation',
|
||||
CONSECA_VERDICT = 'conseca_verdict',
|
||||
STARTUP_STATS = 'startup_stats',
|
||||
}
|
||||
|
||||
export interface LogResponse {
|
||||
@@ -1691,6 +1693,30 @@ export class ClearcutLogger {
|
||||
this.flushIfNeeded();
|
||||
}
|
||||
|
||||
logStartupStatsEvent(event: StartupStatsEvent): void {
|
||||
const data: EventValue[] = [
|
||||
{
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_STARTUP_PHASES,
|
||||
value: JSON.stringify(event.phases),
|
||||
},
|
||||
{
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_STARTUP_OS_PLATFORM,
|
||||
value: event.os_platform,
|
||||
},
|
||||
{
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_STARTUP_OS_RELEASE,
|
||||
value: event.os_release,
|
||||
},
|
||||
{
|
||||
gemini_cli_key: EventMetadataKey.GEMINI_CLI_STARTUP_IS_DOCKER,
|
||||
value: JSON.stringify(event.is_docker),
|
||||
},
|
||||
];
|
||||
|
||||
this.enqueueLogEvent(this.createLogEvent(EventNames.STARTUP_STATS, data));
|
||||
this.flushIfNeeded();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds default fields to data, and returns a new data array. This fields
|
||||
* should exist on all log events.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// Defines valid event metadata keys for Clearcut logging.
|
||||
export enum EventMetadataKey {
|
||||
// Deleted enums: 24
|
||||
// Next ID: 172
|
||||
// Next ID: 176
|
||||
|
||||
GEMINI_CLI_KEY_UNKNOWN = 0,
|
||||
|
||||
@@ -54,6 +54,22 @@ export enum EventMetadataKey {
|
||||
// Logs the output format of the session.
|
||||
GEMINI_CLI_START_SESSION_OUTPUT_FORMAT = 94,
|
||||
|
||||
// ==========================================================================
|
||||
// Startup Stats Event Keys
|
||||
// ==========================================================================
|
||||
|
||||
// Logs the array of startup phases.
|
||||
GEMINI_CLI_STARTUP_PHASES = 172,
|
||||
|
||||
// Logs the OS platform for startup stats.
|
||||
GEMINI_CLI_STARTUP_OS_PLATFORM = 173,
|
||||
|
||||
// Logs the OS release for startup stats.
|
||||
GEMINI_CLI_STARTUP_OS_RELEASE = 174,
|
||||
|
||||
// Logs whether the CLI is running in docker for startup stats.
|
||||
GEMINI_CLI_STARTUP_IS_DOCKER = 175,
|
||||
|
||||
// ==========================================================================
|
||||
// User Prompt Event Keys
|
||||
// ===========================================================================
|
||||
|
||||
@@ -791,6 +791,7 @@ export function logStartupStats(
|
||||
config: Config,
|
||||
event: StartupStatsEvent,
|
||||
): void {
|
||||
ClearcutLogger.getInstance(config)?.logStartupStatsEvent(event);
|
||||
bufferTelemetryEvent(() => {
|
||||
// Wait for experiments to load before emitting so we capture experimentIds
|
||||
void config
|
||||
|
||||
Reference in New Issue
Block a user