@didim365/agent-cli-core 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +420 -0
- package/dist/src/config/providerModels.d.ts +74 -0
- package/dist/src/config/providerModels.js +195 -0
- package/dist/src/config/providerModels.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/providers/providerSelector.d.ts +11 -6
- package/dist/src/providers/providerSelector.js +39 -26
- package/dist/src/providers/providerSelector.js.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# Gemini CLI
|
|
2
|
+
|
|
3
|
+
[](https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/google-gemini/gemini-cli/actions/workflows/chained_e2e.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/@didim365/agent-cli)
|
|
6
|
+
[](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE)
|
|
7
|
+
[](https://codewiki.google/github.com/google-gemini/gemini-cli?utm_source=badge&utm_medium=github&utm_campaign=github.com/google-gemini/gemini-cli)
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
Gemini CLI is an open-source AI agent that brings the power of multiple AI
|
|
12
|
+
providers directly into your terminal. It supports **Gemini**, **Claude**,
|
|
13
|
+
**OpenAI**, and **OpenAI-compatible** (vLLM, Ollama, LM Studio) endpoints,
|
|
14
|
+
giving you the most direct path from your prompt to your preferred model.
|
|
15
|
+
|
|
16
|
+
Learn all about Gemini CLI in our [documentation](https://geminicli.com/docs/).
|
|
17
|
+
|
|
18
|
+
## 🚀 Why Gemini CLI?
|
|
19
|
+
|
|
20
|
+
- **🎯 Free tier**: 60 requests/min and 1,000 requests/day with personal Google
|
|
21
|
+
account.
|
|
22
|
+
- **🧠 Multi-provider support**: Use Gemini, Claude, OpenAI, or local models
|
|
23
|
+
(vLLM/Ollama) — switch providers and models with `/model`.
|
|
24
|
+
- **🔧 Built-in tools**: Google Search grounding, file operations, shell
|
|
25
|
+
commands, web fetching.
|
|
26
|
+
- **🔌 Extensible**: MCP (Model Context Protocol) support for custom
|
|
27
|
+
integrations.
|
|
28
|
+
- **💻 Terminal-first**: Designed for developers who live in the command line.
|
|
29
|
+
- **🛡️ Open source**: Apache 2.0 licensed.
|
|
30
|
+
|
|
31
|
+
## 📦 Installation
|
|
32
|
+
|
|
33
|
+
### Pre-requisites before installation
|
|
34
|
+
|
|
35
|
+
- Node.js version 20 or higher
|
|
36
|
+
- macOS, Linux, or Windows
|
|
37
|
+
|
|
38
|
+
### Quick Install
|
|
39
|
+
|
|
40
|
+
#### Run instantly with npx
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Using npx (no installation required)
|
|
44
|
+
npx @didim365/agent-cli
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Install globally with npm
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g @didim365/agent-cli
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
#### Install globally with Homebrew (macOS/Linux)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
brew install gemini-cli
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### Install globally with MacPorts (macOS)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
sudo port install gemini-cli
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Install with Anaconda (for restricted environments)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Create and activate a new environment
|
|
69
|
+
conda create -y -n gemini_env -c conda-forge nodejs
|
|
70
|
+
conda activate gemini_env
|
|
71
|
+
|
|
72
|
+
# Install Gemini CLI globally via npm (inside the environment)
|
|
73
|
+
npm install -g @didim365/agent-cli
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Release Cadence and Tags
|
|
77
|
+
|
|
78
|
+
See [Releases](./docs/releases.md) for more details.
|
|
79
|
+
|
|
80
|
+
### Preview
|
|
81
|
+
|
|
82
|
+
New preview releases will be published each week at UTC 2359 on Tuesdays. These
|
|
83
|
+
releases will not have been fully vetted and may contain regressions or other
|
|
84
|
+
outstanding issues. Please help us test and install with `preview` tag.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm install -g @didim365/agent-cli@preview
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Stable
|
|
91
|
+
|
|
92
|
+
- New stable releases will be published each week at UTC 2000 on Tuesdays, this
|
|
93
|
+
will be the full promotion of last week's `preview` release + any bug fixes
|
|
94
|
+
and validations. Use `latest` tag.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install -g @didim365/agent-cli@latest
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Nightly
|
|
101
|
+
|
|
102
|
+
- New releases will be published each day at UTC 0000. This will be all changes
|
|
103
|
+
from the main branch as represented at time of release. It should be assumed
|
|
104
|
+
there are pending validations and issues. Use `nightly` tag.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npm install -g @didim365/agent-cli@nightly
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## 📋 Key Features
|
|
111
|
+
|
|
112
|
+
### Code Understanding & Generation
|
|
113
|
+
|
|
114
|
+
- Query and edit large codebases
|
|
115
|
+
- Generate new apps from PDFs, images, or sketches using multimodal capabilities
|
|
116
|
+
- Debug issues and troubleshoot with natural language
|
|
117
|
+
|
|
118
|
+
### Automation & Integration
|
|
119
|
+
|
|
120
|
+
- Automate operational tasks like querying pull requests or handling complex
|
|
121
|
+
rebases
|
|
122
|
+
- Use MCP servers to connect new capabilities, including
|
|
123
|
+
[media generation with Imagen, Veo or Lyria](https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio/tree/main/experiments/mcp-genmedia)
|
|
124
|
+
- Run non-interactively in scripts for workflow automation
|
|
125
|
+
|
|
126
|
+
### Advanced Capabilities
|
|
127
|
+
|
|
128
|
+
- Ground your queries with built-in
|
|
129
|
+
[Google Search](https://ai.google.dev/gemini-api/docs/grounding) for real-time
|
|
130
|
+
information
|
|
131
|
+
- Conversation checkpointing to save and resume complex sessions
|
|
132
|
+
- Custom context files (GEMINI.md) to tailor behavior for your projects
|
|
133
|
+
|
|
134
|
+
### GitHub Integration
|
|
135
|
+
|
|
136
|
+
Integrate Gemini CLI directly into your GitHub workflows with
|
|
137
|
+
[**Gemini CLI GitHub Action**](https://github.com/google-github-actions/run-gemini-cli):
|
|
138
|
+
|
|
139
|
+
- **Pull Request Reviews**: Automated code review with contextual feedback and
|
|
140
|
+
suggestions
|
|
141
|
+
- **Issue Triage**: Automated labeling and prioritization of GitHub issues based
|
|
142
|
+
on content analysis
|
|
143
|
+
- **On-demand Assistance**: Mention `@gemini-cli` in issues and pull requests
|
|
144
|
+
for help with debugging, explanations, or task delegation
|
|
145
|
+
- **Custom Workflows**: Build automated, scheduled and on-demand workflows
|
|
146
|
+
tailored to your team's needs
|
|
147
|
+
|
|
148
|
+
## 🔐 Authentication Options
|
|
149
|
+
|
|
150
|
+
Choose the authentication method that best fits your needs. You can also use
|
|
151
|
+
`/auth login` inside the CLI to interactively select a provider and enter your
|
|
152
|
+
API key.
|
|
153
|
+
|
|
154
|
+
### Option 1: Login with Google (Gemini)
|
|
155
|
+
|
|
156
|
+
**✨ Best for:** Individual developers and Gemini Code Assist license holders.
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
gemini
|
|
160
|
+
# Select "Login with Google" and follow the browser authentication flow
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
For organization accounts, set your Google Cloud project first:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
|
|
167
|
+
gemini
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Option 2: Gemini API Key
|
|
171
|
+
|
|
172
|
+
**✨ Best for:** Developers who need specific Gemini model control.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
export GEMINI_API_KEY="YOUR_API_KEY"
|
|
176
|
+
gemini
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Option 3: Claude (Anthropic)
|
|
180
|
+
|
|
181
|
+
**✨ Best for:** Developers who prefer Claude models (Opus, Sonnet, Haiku).
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
export ANTHROPIC_API_KEY="YOUR_API_KEY"
|
|
185
|
+
gemini
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Option 4: OpenAI
|
|
189
|
+
|
|
190
|
+
**✨ Best for:** Developers who prefer OpenAI models (GPT-4.1, o3, o4-mini).
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
export OPENAI_API_KEY="YOUR_API_KEY"
|
|
194
|
+
gemini
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Option 5: Vertex AI
|
|
198
|
+
|
|
199
|
+
**✨ Best for:** Enterprise teams and production workloads.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
export GOOGLE_API_KEY="YOUR_API_KEY"
|
|
203
|
+
export GOOGLE_GENAI_USE_VERTEXAI=true
|
|
204
|
+
gemini
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Option 6: OpenAI-compatible (vLLM, Ollama, LM Studio)
|
|
208
|
+
|
|
209
|
+
**✨ Best for:** Local/self-hosted models and privacy-sensitive environments.
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
export ENABLE_MULTI_PROVIDER=true
|
|
213
|
+
export LLM_PROVIDER=openai-compatible
|
|
214
|
+
export LLM_BASE_URL="http://localhost:8000/v1"
|
|
215
|
+
gemini
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
For detailed setup for each provider, see the
|
|
219
|
+
[authentication guide](./docs/get-started/authentication.md) and
|
|
220
|
+
[provider guide](./docs/providers.md).
|
|
221
|
+
|
|
222
|
+
## 🚀 Getting Started
|
|
223
|
+
|
|
224
|
+
### Basic Usage
|
|
225
|
+
|
|
226
|
+
#### Start in current directory
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
gemini
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
#### Include multiple directories
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
gemini --include-directories ../lib,../docs
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
#### Use specific model
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
gemini -m gemini-2.5-flash # Gemini
|
|
242
|
+
gemini -m claude-sonnet-4-5-20250929 # Claude
|
|
243
|
+
gemini -m gpt-4.1 # OpenAI
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
#### Non-interactive mode for scripts
|
|
247
|
+
|
|
248
|
+
Get a simple text response:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
gemini -p "Explain the architecture of this codebase"
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
For more advanced scripting, including how to parse JSON and handle errors, use
|
|
255
|
+
the `--output-format json` flag to get structured output:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
gemini -p "Explain the architecture of this codebase" --output-format json
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
For real-time event streaming (useful for monitoring long-running operations),
|
|
262
|
+
use `--output-format stream-json` to get newline-delimited JSON events:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
gemini -p "Run tests and deploy" --output-format stream-json
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Quick Examples
|
|
269
|
+
|
|
270
|
+
#### Start a new project
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
cd new-project/
|
|
274
|
+
gemini
|
|
275
|
+
> Write me a Discord bot that answers questions using a FAQ.md file I will provide
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
#### Analyze existing code
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
git clone https://github.com/google-gemini/gemini-cli
|
|
282
|
+
cd gemini-cli
|
|
283
|
+
gemini
|
|
284
|
+
> Give me a summary of all of the changes that went in yesterday
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## 📚 Documentation
|
|
288
|
+
|
|
289
|
+
### Getting Started
|
|
290
|
+
|
|
291
|
+
- [**Quickstart Guide**](./docs/get-started/index.md) - Get up and running
|
|
292
|
+
quickly.
|
|
293
|
+
- [**Authentication Setup**](./docs/get-started/authentication.md) - Detailed
|
|
294
|
+
auth configuration.
|
|
295
|
+
- [**Configuration Guide**](./docs/get-started/configuration.md) - Settings and
|
|
296
|
+
customization.
|
|
297
|
+
- [**Keyboard Shortcuts**](./docs/cli/keyboard-shortcuts.md) - Productivity
|
|
298
|
+
tips.
|
|
299
|
+
|
|
300
|
+
### Core Features
|
|
301
|
+
|
|
302
|
+
- [**Commands Reference**](./docs/cli/commands.md) - All slash commands
|
|
303
|
+
(`/help`, `/chat`, etc).
|
|
304
|
+
- [**Custom Commands**](./docs/cli/custom-commands.md) - Create your own
|
|
305
|
+
reusable commands.
|
|
306
|
+
- [**Context Files (GEMINI.md)**](./docs/cli/gemini-md.md) - Provide persistent
|
|
307
|
+
context to Gemini CLI.
|
|
308
|
+
- [**Checkpointing**](./docs/cli/checkpointing.md) - Save and resume
|
|
309
|
+
conversations.
|
|
310
|
+
- [**Token Caching**](./docs/cli/token-caching.md) - Optimize token usage.
|
|
311
|
+
|
|
312
|
+
### Tools & Extensions
|
|
313
|
+
|
|
314
|
+
- [**Built-in Tools Overview**](./docs/tools/index.md)
|
|
315
|
+
- [File System Operations](./docs/tools/file-system.md)
|
|
316
|
+
- [Shell Commands](./docs/tools/shell.md)
|
|
317
|
+
- [Web Fetch & Search](./docs/tools/web-fetch.md)
|
|
318
|
+
- [**MCP Server Integration**](./docs/tools/mcp-server.md) - Extend with custom
|
|
319
|
+
tools.
|
|
320
|
+
- [**Custom Extensions**](./docs/extensions/index.md) - Build and share your own
|
|
321
|
+
commands.
|
|
322
|
+
|
|
323
|
+
### Advanced Topics
|
|
324
|
+
|
|
325
|
+
- [**Headless Mode (Scripting)**](./docs/cli/headless.md) - Use Gemini CLI in
|
|
326
|
+
automated workflows.
|
|
327
|
+
- [**Provider Guide**](./docs/providers.md) - Multi-provider runtime usage
|
|
328
|
+
(`gemini`, `claude`, `openai`, `openai-compatible` including vLLM).
|
|
329
|
+
- [**Multi-Provider Configuration**](./docs/configuration.md) - Environment
|
|
330
|
+
variables and precedence for provider/model resolution.
|
|
331
|
+
- [**Migration Guide**](./docs/migration.md) - Move from Gemini-only to
|
|
332
|
+
provider-independent (`llm*`) call paths.
|
|
333
|
+
- [**Provider Adapter API**](./docs/api/providers.md) - Adapter contract and
|
|
334
|
+
streaming/event types overview.
|
|
335
|
+
- [**Architecture Overview**](./docs/architecture.md) - How Gemini CLI works.
|
|
336
|
+
- [**IDE Integration**](./docs/ide-integration/index.md) - VS Code companion.
|
|
337
|
+
- [**Sandboxing & Security**](./docs/cli/sandbox.md) - Safe execution
|
|
338
|
+
environments.
|
|
339
|
+
- [**Trusted Folders**](./docs/cli/trusted-folders.md) - Control execution
|
|
340
|
+
policies by folder.
|
|
341
|
+
- [**Enterprise Guide**](./docs/cli/enterprise.md) - Deploy and manage in a
|
|
342
|
+
corporate environment.
|
|
343
|
+
- [**Telemetry & Monitoring**](./docs/cli/telemetry.md) - Usage tracking.
|
|
344
|
+
- [**Tools API Development**](./docs/core/tools-api.md) - Create custom tools.
|
|
345
|
+
- [**Local development**](./docs/local-development.md) - Local development
|
|
346
|
+
tooling.
|
|
347
|
+
|
|
348
|
+
### vLLM Quick Start
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
export ENABLE_MULTI_PROVIDER=true
|
|
352
|
+
export LLM_PROVIDER=openai-compatible
|
|
353
|
+
export LLM_BASE_URL="http://localhost:8000/v1"
|
|
354
|
+
export LLM_MODEL="Qwen/Qwen2.5-7B-Instruct"
|
|
355
|
+
gemini -m Qwen/Qwen2.5-7B-Instruct
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Troubleshooting & Support
|
|
359
|
+
|
|
360
|
+
- [**Troubleshooting Guide**](./docs/troubleshooting.md) - Common issues and
|
|
361
|
+
solutions.
|
|
362
|
+
- [**FAQ**](./docs/faq.md) - Frequently asked questions.
|
|
363
|
+
- Use `/bug` command to report issues directly from the CLI.
|
|
364
|
+
|
|
365
|
+
### Using MCP Servers
|
|
366
|
+
|
|
367
|
+
Configure MCP servers in `~/.gemini/settings.json` to extend Gemini CLI with
|
|
368
|
+
custom tools:
|
|
369
|
+
|
|
370
|
+
```text
|
|
371
|
+
> @github List my open pull requests
|
|
372
|
+
> @slack Send a summary of today's commits to #dev channel
|
|
373
|
+
> @database Run a query to find inactive users
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
See the [MCP Server Integration guide](./docs/tools/mcp-server.md) for setup
|
|
377
|
+
instructions.
|
|
378
|
+
|
|
379
|
+
## 🤝 Contributing
|
|
380
|
+
|
|
381
|
+
We welcome contributions! Gemini CLI is fully open source (Apache 2.0), and we
|
|
382
|
+
encourage the community to:
|
|
383
|
+
|
|
384
|
+
- Report bugs and suggest features.
|
|
385
|
+
- Improve documentation.
|
|
386
|
+
- Submit code improvements.
|
|
387
|
+
- Share your MCP servers and extensions.
|
|
388
|
+
|
|
389
|
+
See our [Contributing Guide](./CONTRIBUTING.md) for development setup, coding
|
|
390
|
+
standards, and how to submit pull requests.
|
|
391
|
+
|
|
392
|
+
Check our [Official Roadmap](https://github.com/orgs/google-gemini/projects/11)
|
|
393
|
+
for planned features and priorities.
|
|
394
|
+
|
|
395
|
+
## 📖 Resources
|
|
396
|
+
|
|
397
|
+
- **[Official Roadmap](./ROADMAP.md)** - See what's coming next.
|
|
398
|
+
- **[Changelog](./docs/changelogs/index.md)** - See recent notable updates.
|
|
399
|
+
- **[NPM Package](https://www.npmjs.com/package/@didim365/agent-cli)** - Package
|
|
400
|
+
registry.
|
|
401
|
+
- **[GitHub Issues](https://github.com/google-gemini/gemini-cli/issues)** -
|
|
402
|
+
Report bugs or request features.
|
|
403
|
+
- **[Security Advisories](https://github.com/google-gemini/gemini-cli/security/advisories)** -
|
|
404
|
+
Security updates.
|
|
405
|
+
|
|
406
|
+
### Uninstall
|
|
407
|
+
|
|
408
|
+
See the [Uninstall Guide](docs/cli/uninstall.md) for removal instructions.
|
|
409
|
+
|
|
410
|
+
## 📄 Legal
|
|
411
|
+
|
|
412
|
+
- **License**: [Apache License 2.0](LICENSE)
|
|
413
|
+
- **Terms of Service**: [Terms & Privacy](./docs/tos-privacy.md)
|
|
414
|
+
- **Security**: [Security Policy](SECURITY.md)
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
<p align="center">
|
|
419
|
+
Built with ❤️ by Google and the open source community
|
|
420
|
+
</p>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Individual model metadata within a provider group.
|
|
8
|
+
*/
|
|
9
|
+
export interface ProviderModelInfo {
|
|
10
|
+
/** API에 전달하는 모델 ID */
|
|
11
|
+
id: string;
|
|
12
|
+
/** UI에 표시할 이름 (생략 시 id 사용) */
|
|
13
|
+
displayName?: string;
|
|
14
|
+
/** 설명 텍스트 */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** 이 모델이 프로바이더의 기본 권장 모델인지 */
|
|
17
|
+
isDefault?: boolean;
|
|
18
|
+
/** 모델 카테고리 */
|
|
19
|
+
category?: 'auto' | 'recommended' | 'reasoning' | 'general' | 'lite';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Provider-level model group containing presets and model list.
|
|
23
|
+
*/
|
|
24
|
+
export interface ProviderModelGroup {
|
|
25
|
+
/** 프로바이더 키 (ProviderType 값과 매칭) */
|
|
26
|
+
providerKey: string;
|
|
27
|
+
/** 첫번째 화면에서 보여줄 프리셋 옵션 */
|
|
28
|
+
presets: Array<{
|
|
29
|
+
value: string;
|
|
30
|
+
title: string;
|
|
31
|
+
description: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** 두번째 화면(Manual)에서 보여줄 개별 모델 목록 */
|
|
34
|
+
models: ProviderModelInfo[];
|
|
35
|
+
/** 텍스트 입력 모드 여부 (sLM용) */
|
|
36
|
+
freeformInput?: boolean;
|
|
37
|
+
/** 모델 선택 비활성 (DidimAIStudio 등) */
|
|
38
|
+
modelSelectionDisabled?: boolean;
|
|
39
|
+
/** 비활성 시 안내 메시지 */
|
|
40
|
+
disabledMessage?: string;
|
|
41
|
+
/** 레지스트리 외 커스텀 모델 허용 여부 (기본 true) */
|
|
42
|
+
allowCustomModels?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Single Source of Truth for provider model metadata.
|
|
46
|
+
*
|
|
47
|
+
* Each key corresponds to a ProviderType enum value.
|
|
48
|
+
* `DEFAULT_PROVIDER_MODELS` in providerSelector.ts is derived from this registry.
|
|
49
|
+
*/
|
|
50
|
+
export declare const PROVIDER_MODEL_REGISTRY: Record<string, ProviderModelGroup>;
|
|
51
|
+
/**
|
|
52
|
+
* Get the default model for a provider from the registry.
|
|
53
|
+
*
|
|
54
|
+
* Returns the model marked with `isDefault: true`, or falls back to
|
|
55
|
+
* `presets[0].value` → `models[0].id` → `'default'`.
|
|
56
|
+
*
|
|
57
|
+
* @param providerKey - Registry key (matches ProviderType enum value)
|
|
58
|
+
* @returns Default model ID string
|
|
59
|
+
*/
|
|
60
|
+
export declare function getDefaultModelFromRegistry(providerKey: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Validate whether a model is appropriate for a given provider.
|
|
63
|
+
*
|
|
64
|
+
* Validation strategy:
|
|
65
|
+
* - `freeformInput` providers accept any model
|
|
66
|
+
* - `modelSelectionDisabled` providers skip validation
|
|
67
|
+
* - Registry models (presets + models) are always valid
|
|
68
|
+
* - `allowCustomModels` (default true): reject only models owned by other providers
|
|
69
|
+
*
|
|
70
|
+
* @param model - Model ID to validate
|
|
71
|
+
* @param providerKey - Target provider key
|
|
72
|
+
* @returns true if the model is valid for the provider
|
|
73
|
+
*/
|
|
74
|
+
export declare function isModelValidForProvider(model: string, providerKey: string): boolean;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Single Source of Truth for provider model metadata.
|
|
8
|
+
*
|
|
9
|
+
* Each key corresponds to a ProviderType enum value.
|
|
10
|
+
* `DEFAULT_PROVIDER_MODELS` in providerSelector.ts is derived from this registry.
|
|
11
|
+
*/
|
|
12
|
+
export const PROVIDER_MODEL_REGISTRY = {
|
|
13
|
+
gemini: {
|
|
14
|
+
providerKey: 'gemini',
|
|
15
|
+
presets: [
|
|
16
|
+
{
|
|
17
|
+
value: 'auto-gemini-3',
|
|
18
|
+
title: 'Auto (Gemini 3)',
|
|
19
|
+
description: 'Let Didim CLI decide the best model: gemini-3-pro, gemini-3-flash',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
value: 'auto-gemini-2.5',
|
|
23
|
+
title: 'Auto (Gemini 2.5)',
|
|
24
|
+
description: 'Let Didim CLI decide the best model: gemini-2.5-pro, gemini-2.5-flash',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
models: [
|
|
28
|
+
{ id: 'gemini-3-pro-preview', category: 'general' },
|
|
29
|
+
{ id: 'gemini-3-flash-preview', category: 'lite' },
|
|
30
|
+
{ id: 'gemini-2.5-pro', category: 'general', isDefault: true },
|
|
31
|
+
{ id: 'gemini-2.5-flash', category: 'lite' },
|
|
32
|
+
{ id: 'gemini-2.5-flash-lite', category: 'lite' },
|
|
33
|
+
],
|
|
34
|
+
allowCustomModels: true,
|
|
35
|
+
},
|
|
36
|
+
claude: {
|
|
37
|
+
providerKey: 'claude',
|
|
38
|
+
presets: [
|
|
39
|
+
{
|
|
40
|
+
value: 'claude-opus-4-6',
|
|
41
|
+
title: 'Recommended (claude-opus-4-6)',
|
|
42
|
+
description: 'Most intelligent model for building agents and coding',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
models: [
|
|
46
|
+
{
|
|
47
|
+
id: 'claude-opus-4-6',
|
|
48
|
+
description: 'Most intelligent, agents & coding',
|
|
49
|
+
isDefault: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'claude-sonnet-4-5-20250929',
|
|
53
|
+
description: 'Best speed & intelligence balance',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'claude-haiku-4-5-20251001',
|
|
57
|
+
description: 'Fastest, near-frontier intelligence',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
allowCustomModels: true,
|
|
61
|
+
},
|
|
62
|
+
openai: {
|
|
63
|
+
providerKey: 'openai',
|
|
64
|
+
presets: [
|
|
65
|
+
{
|
|
66
|
+
value: 'gpt-4.1',
|
|
67
|
+
title: 'Recommended (gpt-4.1)',
|
|
68
|
+
description: 'Smartest non-reasoning model for complex tasks',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
models: [
|
|
72
|
+
{
|
|
73
|
+
id: 'gpt-4.1',
|
|
74
|
+
description: 'Smartest non-reasoning model',
|
|
75
|
+
isDefault: true,
|
|
76
|
+
},
|
|
77
|
+
{ id: 'gpt-4.1-mini', description: 'Fast, balanced performance' },
|
|
78
|
+
{ id: 'gpt-4.1-nano', description: 'Fastest, most cost-efficient' },
|
|
79
|
+
{
|
|
80
|
+
id: 'gpt-4o',
|
|
81
|
+
description: 'High-intelligence flagship',
|
|
82
|
+
category: 'general',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'o3',
|
|
86
|
+
description: 'Most powerful reasoning model',
|
|
87
|
+
category: 'reasoning',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'o4-mini',
|
|
91
|
+
description: 'Fast, cost-efficient reasoning',
|
|
92
|
+
category: 'reasoning',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
allowCustomModels: true,
|
|
96
|
+
},
|
|
97
|
+
'openai-compatible': {
|
|
98
|
+
providerKey: 'openai-compatible',
|
|
99
|
+
presets: [],
|
|
100
|
+
models: [],
|
|
101
|
+
freeformInput: true,
|
|
102
|
+
},
|
|
103
|
+
didim: {
|
|
104
|
+
providerKey: 'didim',
|
|
105
|
+
presets: [],
|
|
106
|
+
models: [],
|
|
107
|
+
modelSelectionDisabled: true,
|
|
108
|
+
disabledMessage: 'DidimAIStudio는 시나리오 기반으로 동작하므로 개별 모델 선택을 지원하지 않습니다.',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Get the default model for a provider from the registry.
|
|
113
|
+
*
|
|
114
|
+
* Returns the model marked with `isDefault: true`, or falls back to
|
|
115
|
+
* `presets[0].value` → `models[0].id` → `'default'`.
|
|
116
|
+
*
|
|
117
|
+
* @param providerKey - Registry key (matches ProviderType enum value)
|
|
118
|
+
* @returns Default model ID string
|
|
119
|
+
*/
|
|
120
|
+
export function getDefaultModelFromRegistry(providerKey) {
|
|
121
|
+
const group = PROVIDER_MODEL_REGISTRY[providerKey];
|
|
122
|
+
if (!group)
|
|
123
|
+
return 'default';
|
|
124
|
+
if (group.freeformInput)
|
|
125
|
+
return 'default';
|
|
126
|
+
if (group.modelSelectionDisabled)
|
|
127
|
+
return `${providerKey}-default`;
|
|
128
|
+
const defaultModel = group.models.find((m) => m.isDefault);
|
|
129
|
+
if (defaultModel)
|
|
130
|
+
return defaultModel.id;
|
|
131
|
+
if (group.presets.length > 0)
|
|
132
|
+
return group.presets[0].value;
|
|
133
|
+
return group.models[0]?.id ?? 'default';
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Validate whether a model is appropriate for a given provider.
|
|
137
|
+
*
|
|
138
|
+
* Validation strategy:
|
|
139
|
+
* - `freeformInput` providers accept any model
|
|
140
|
+
* - `modelSelectionDisabled` providers skip validation
|
|
141
|
+
* - Registry models (presets + models) are always valid
|
|
142
|
+
* - `allowCustomModels` (default true): reject only models owned by other providers
|
|
143
|
+
*
|
|
144
|
+
* @param model - Model ID to validate
|
|
145
|
+
* @param providerKey - Target provider key
|
|
146
|
+
* @returns true if the model is valid for the provider
|
|
147
|
+
*/
|
|
148
|
+
export function isModelValidForProvider(model, providerKey) {
|
|
149
|
+
const group = PROVIDER_MODEL_REGISTRY[providerKey];
|
|
150
|
+
if (!group)
|
|
151
|
+
return true;
|
|
152
|
+
if (group.freeformInput)
|
|
153
|
+
return true;
|
|
154
|
+
if (group.modelSelectionDisabled)
|
|
155
|
+
return true;
|
|
156
|
+
// Check registry (presets + models)
|
|
157
|
+
const presetValues = group.presets.map((p) => p.value);
|
|
158
|
+
const modelIds = group.models.map((m) => m.id);
|
|
159
|
+
if (presetValues.includes(model) || modelIds.includes(model))
|
|
160
|
+
return true;
|
|
161
|
+
// allowCustomModels (default true): reject only other-provider models
|
|
162
|
+
const allowCustom = group.allowCustomModels !== false;
|
|
163
|
+
if (allowCustom) {
|
|
164
|
+
return !isModelOwnedByOtherProvider(model, providerKey);
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Determine if a model clearly belongs to another provider based on prefix heuristics.
|
|
170
|
+
*
|
|
171
|
+
* Prefix rules:
|
|
172
|
+
* - `claude-*` → claude
|
|
173
|
+
* - `gpt-*`, `o[0-9]*` → openai
|
|
174
|
+
* - `gemini-*`, `auto-gemini*` → gemini
|
|
175
|
+
*/
|
|
176
|
+
function isModelOwnedByOtherProvider(model, currentProvider) {
|
|
177
|
+
// Normalize to lowercase for case-insensitive prefix matching
|
|
178
|
+
const normalized = model.toLowerCase();
|
|
179
|
+
const providerPrefixes = {
|
|
180
|
+
claude: [(m) => m.startsWith('claude-')],
|
|
181
|
+
openai: [(m) => m.startsWith('gpt-'), (m) => /^o[0-9]/.test(m)],
|
|
182
|
+
gemini: [
|
|
183
|
+
(m) => m.startsWith('gemini-'),
|
|
184
|
+
(m) => m.startsWith('auto-gemini'),
|
|
185
|
+
],
|
|
186
|
+
};
|
|
187
|
+
for (const [provider, checks] of Object.entries(providerPrefixes)) {
|
|
188
|
+
if (provider === currentProvider)
|
|
189
|
+
continue;
|
|
190
|
+
if (checks.some((check) => check(normalized)))
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=providerModels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerModels.js","sourceRoot":"","sources":["../../../src/config/providerModels.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0CH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAuC;IACzE,MAAM,EAAE;QACN,WAAW,EAAE,QAAQ;QACrB,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,eAAe;gBACtB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EACT,mEAAmE;aACtE;YACD;gBACE,KAAK,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AC;QACxC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC/D,MAAM,EAAE;YACN,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC;YAC9B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC;SACnC;KACF,CAAC;IAEF,KAAK,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAClE,IAAI,QAAQ,KAAK,eAAe;YAAE,SAAS;QAC3C,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IAC7D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2026 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export declare const GIT_COMMIT_INFO = "
|
|
7
|
-
export declare const CLI_VERSION = "0.27.0
|
|
6
|
+
export declare const GIT_COMMIT_INFO = "95635475b";
|
|
7
|
+
export declare const CLI_VERSION = "0.27.0";
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
// This file is auto-generated by the build script (scripts/generate-git-commit-info.js)
|
|
7
7
|
// Do not edit this file manually.
|
|
8
|
-
export const GIT_COMMIT_INFO = '
|
|
9
|
-
export const CLI_VERSION = '0.27.0
|
|
8
|
+
export const GIT_COMMIT_INFO = '95635475b';
|
|
9
|
+
export const CLI_VERSION = '0.27.0';
|
|
10
10
|
//# sourceMappingURL=git-commit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../../../src/generated/git-commit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wFAAwF;AACxF,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../../../src/generated/git-commit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wFAAwF;AACxF,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
export * from './config/config.js';
|
|
7
7
|
export * from './config/defaultModelConfigs.js';
|
|
8
8
|
export * from './config/models.js';
|
|
9
|
+
export { PROVIDER_MODEL_REGISTRY, getDefaultModelFromRegistry, isModelValidForProvider, type ProviderModelInfo, type ProviderModelGroup, } from './config/providerModels.js';
|
|
9
10
|
export * from './output/types.js';
|
|
10
11
|
export * from './output/json-formatter.js';
|
|
11
12
|
export * from './output/stream-json-formatter.js';
|
package/dist/src/index.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export * from './config/config.js';
|
|
8
8
|
export * from './config/defaultModelConfigs.js';
|
|
9
9
|
export * from './config/models.js';
|
|
10
|
+
export { PROVIDER_MODEL_REGISTRY, getDefaultModelFromRegistry, isModelValidForProvider, } from './config/providerModels.js';
|
|
10
11
|
export * from './output/types.js';
|
|
11
12
|
export * from './output/json-formatter.js';
|
|
12
13
|
export * from './output/stream-json-formatter.js';
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,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Ac,4BAA4B,CAAC;AAE3C,6BAA6B;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AAEvC,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAMpE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,6BAA6B;AAC7B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,sBAAsB;AACtB,cAAc,kBAAkB,CAAC;AAEjC,oBAAoB;AACpB,cAAc,kBAAkB,CAAC;AAEjC,qBAAqB;AACrB,cAAc,mBAAmB,CAAC;AAElC,qBAAqB;AACrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -78,13 +78,18 @@ export declare function isGeminiSpecificModel(model: string): boolean;
|
|
|
78
78
|
/**
|
|
79
79
|
* Resolve the model name for a given provider.
|
|
80
80
|
*
|
|
81
|
-
*
|
|
82
|
-
* 1. If model is not Gemini-specific → pass through unchanged
|
|
83
|
-
* 2. LLM_MODEL env var → use as explicit override
|
|
84
|
-
* 3. Gemini-specific model + non-Gemini provider → provider's default model
|
|
85
|
-
* 4. Gemini provider → pass through unchanged
|
|
81
|
+
* 0. modelSelectionDisabled provider (Didim) → always return fixed default
|
|
86
82
|
*
|
|
87
|
-
*
|
|
83
|
+
* Gemini-specific models (gemini-*, auto-gemini*, aliases):
|
|
84
|
+
* 1. Gemini provider → pass through unchanged
|
|
85
|
+
* 2. LLM_MODEL env var → use if valid for target provider (cross-provider validated)
|
|
86
|
+
* 3. Non-Gemini provider → provider's default model from registry
|
|
87
|
+
*
|
|
88
|
+
* Non-Gemini models:
|
|
89
|
+
* 4. Valid for target provider → pass through
|
|
90
|
+
* 5. Cross-provider model (e.g., claude-* on openai) → provider default
|
|
91
|
+
*
|
|
92
|
+
* @param model - Current model name
|
|
88
93
|
* @param provider - Target provider type or provider name string
|
|
89
94
|
* @returns Resolved model name appropriate for the provider
|
|
90
95
|
*/
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ProviderType, getProviderForAuthType, } from './providerTypes.js';
|
|
7
7
|
import { LlmError, LlmErrorType } from './errors.js';
|
|
8
|
+
import { PROVIDER_MODEL_REGISTRY, getDefaultModelFromRegistry, isModelValidForProvider, } from '../config/providerModels.js';
|
|
8
9
|
/**
|
|
9
10
|
* Required environment variables per provider.
|
|
10
11
|
*/
|
|
@@ -133,15 +134,16 @@ export function validateProviderEnv(provider) {
|
|
|
133
134
|
/**
|
|
134
135
|
* Default model names per provider type.
|
|
135
136
|
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
137
|
+
* Derived from PROVIDER_MODEL_REGISTRY (SSOT) to prevent dual-maintenance.
|
|
138
|
+
* When the CLI is configured with a Gemini-specific model but a non-Gemini
|
|
139
|
+
* provider is selected, these defaults are used instead.
|
|
138
140
|
*/
|
|
139
141
|
const DEFAULT_PROVIDER_MODELS = {
|
|
140
|
-
[ProviderType.Gemini]: 'gemini
|
|
141
|
-
[ProviderType.Claude]: 'claude
|
|
142
|
-
[ProviderType.OpenAI]: '
|
|
143
|
-
[ProviderType.OpenAICompatible]: '
|
|
144
|
-
[ProviderType.Didim]: 'didim
|
|
142
|
+
[ProviderType.Gemini]: getDefaultModelFromRegistry('gemini'),
|
|
143
|
+
[ProviderType.Claude]: getDefaultModelFromRegistry('claude'),
|
|
144
|
+
[ProviderType.OpenAI]: getDefaultModelFromRegistry('openai'),
|
|
145
|
+
[ProviderType.OpenAICompatible]: getDefaultModelFromRegistry('openai-compatible'),
|
|
146
|
+
[ProviderType.Didim]: getDefaultModelFromRegistry('didim'),
|
|
145
147
|
};
|
|
146
148
|
/**
|
|
147
149
|
* Gemini model aliases recognized by the CLI.
|
|
@@ -171,33 +173,44 @@ export function isGeminiSpecificModel(model) {
|
|
|
171
173
|
/**
|
|
172
174
|
* Resolve the model name for a given provider.
|
|
173
175
|
*
|
|
174
|
-
*
|
|
175
|
-
* 1. If model is not Gemini-specific → pass through unchanged
|
|
176
|
-
* 2. LLM_MODEL env var → use as explicit override
|
|
177
|
-
* 3. Gemini-specific model + non-Gemini provider → provider's default model
|
|
178
|
-
* 4. Gemini provider → pass through unchanged
|
|
176
|
+
* 0. modelSelectionDisabled provider (Didim) → always return fixed default
|
|
179
177
|
*
|
|
180
|
-
*
|
|
178
|
+
* Gemini-specific models (gemini-*, auto-gemini*, aliases):
|
|
179
|
+
* 1. Gemini provider → pass through unchanged
|
|
180
|
+
* 2. LLM_MODEL env var → use if valid for target provider (cross-provider validated)
|
|
181
|
+
* 3. Non-Gemini provider → provider's default model from registry
|
|
182
|
+
*
|
|
183
|
+
* Non-Gemini models:
|
|
184
|
+
* 4. Valid for target provider → pass through
|
|
185
|
+
* 5. Cross-provider model (e.g., claude-* on openai) → provider default
|
|
186
|
+
*
|
|
187
|
+
* @param model - Current model name
|
|
181
188
|
* @param provider - Target provider type or provider name string
|
|
182
189
|
* @returns Resolved model name appropriate for the provider
|
|
183
190
|
*/
|
|
184
191
|
export function resolveProviderModel(model, provider) {
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
|
|
192
|
+
// modelSelectionDisabled providers always use their fixed default
|
|
193
|
+
const group = PROVIDER_MODEL_REGISTRY[provider];
|
|
194
|
+
if (group?.modelSelectionDisabled) {
|
|
195
|
+
return getDefaultModelFromRegistry(provider);
|
|
188
196
|
}
|
|
189
|
-
// Gemini
|
|
190
|
-
if (
|
|
191
|
-
|
|
197
|
+
// Gemini-specific model handling
|
|
198
|
+
if (isGeminiSpecificModel(model)) {
|
|
199
|
+
if (provider === ProviderType.Gemini)
|
|
200
|
+
return model;
|
|
201
|
+
// LLM_MODEL env var: validate before use to prevent cross-provider leak
|
|
202
|
+
const llmModel = process.env['LLM_MODEL'];
|
|
203
|
+
if (llmModel && isModelValidForProvider(llmModel, provider)) {
|
|
204
|
+
return llmModel;
|
|
205
|
+
}
|
|
206
|
+
// Gemini-specific model + non-Gemini provider → provider default
|
|
207
|
+
return getDefaultModelFromRegistry(provider);
|
|
192
208
|
}
|
|
193
|
-
//
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
return llmModel;
|
|
209
|
+
// Non-Gemini model: validate against target provider
|
|
210
|
+
if (!isModelValidForProvider(model, provider)) {
|
|
211
|
+
return getDefaultModelFromRegistry(provider);
|
|
197
212
|
}
|
|
198
|
-
|
|
199
|
-
const providerKey = provider;
|
|
200
|
-
return DEFAULT_PROVIDER_MODELS[providerKey] ?? model;
|
|
213
|
+
return model;
|
|
201
214
|
}
|
|
202
215
|
/**
|
|
203
216
|
* Get API key for a provider from environment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerSelector.js","sourceRoot":"","sources":["../../../src/providers/providerSelector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,sBAAsB,GAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"providerSelector.js","sourceRoot":"","sources":["../../../src/providers/providerSelector.ts"],"names":[],"mappings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