package lock conflict
This commit is contained in:
commit
7a4116cf41
17 changed files with 321 additions and 983 deletions
79
.continue/prompts/update-llm-info.prompt
Normal file
79
.continue/prompts/update-llm-info.prompt
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
name: Update LLM Info
|
||||
description: Updates Gemini blocks with latest information
|
||||
version: 2
|
||||
---
|
||||
I need you to update this repo with the latest information about large language models from certain providers.
|
||||
The information is stored in the `packages/llm-info` directory, which operates as its own npm package.
|
||||
Information is stored in a simple JSON format, with one file of models per "provider" (e.g. gemini, ollama, openai, etc).
|
||||
For example, Gemini model information is stored in `packages/llm-info/src/providers/gemini.ts`.
|
||||
|
||||
To make these updates for a given provider, perform the following steps one at a time:
|
||||
|
||||
1. VIEW CURRENT INFORMATION
|
||||
|
||||
To view the current llm info, read the file (e.g. `packages/llm-info/src/providers/gemini.ts`) using the read_file tool.
|
||||
If you do not see a tool for reading files, let me know.
|
||||
|
||||
For reference, here is the LLMInfo interface used to store the information:
|
||||
|
||||
```typescript
|
||||
export interface LlmInfo {
|
||||
model: string; // the model name used to distinguish the model at the API layer, e.g. "gemini-2.5-pro-preview-05-06"
|
||||
displayName?: string; // A fitting display name, e.g. "Gemini 2.5 Pro Preview"
|
||||
description?: string; // A short description of the model, as similar as possible to descriptions found on the provider's website
|
||||
contextLength?: number; // The size of the context window in tokens, often called "max input tokens" or "context length"
|
||||
maxCompletionTokens?: number; // The maximum number of tokens the model can output
|
||||
regex?: RegExp; // A regex expression to uniquely match the model name if it had some slight modifications/upgrades, e.g. /gemini-2\.5-pro-preview/i
|
||||
mediaTypes?: MediaType[]; // Input/output types supported by the model, e.g. [MediaType.Text, MediaType.Image]
|
||||
}
|
||||
|
||||
export enum MediaType {
|
||||
Text = "text",
|
||||
Image = "image",
|
||||
Audio = "audio",
|
||||
Video = "video",
|
||||
}
|
||||
|
||||
export const AllMediaTypes = [
|
||||
MediaType.Text,
|
||||
MediaType.Image,
|
||||
MediaType.Audio,
|
||||
MediaType.Video,
|
||||
];
|
||||
```
|
||||
|
||||
2. EXTRACT NEW INFORMATION
|
||||
|
||||
New information will be pulled from the internet.
|
||||
If you do not see a web search tool, let me know.
|
||||
|
||||
Retrieve the following sites per these providers, and consider these notes on how to extract the information:
|
||||
- "gemini": https://ai.google.dev/gemini-api/docs/models - maxCompletionTokens is called "Output token limit", contextLength is called "Input token limit"
|
||||
// TODO: add info for openai, ollama, etc
|
||||
|
||||
For any other providers, search the web for "latest [provider] models" and find the most relevant model information using your best judgement.
|
||||
Generally, ignore models that do not support text output. These models will be used in a coding assistant client that only supports text/image input and text/output, so extraneous capabilities can be ignored.
|
||||
Sometimes, "Experimental", "Preview", or similar versions of models are available. The latest-date version of each should have its own information maintained.
|
||||
|
||||
3. UPDATE THE INFORMATION
|
||||
|
||||
Use the edit file tool to submit updates to the relevant provider file (e.g. `packages/llm-info/src/providers/gemini.ts`).
|
||||
Let me know if you do not see a tool for editing files.
|
||||
|
||||
Generally, avoid making changes to existing information, as it is probably up to date.
|
||||
Primarily, focus on adding new models or adding missing information to existing models.
|
||||
NEVER delete any existing models, but let me know if you think one should be removed.
|
||||
Stop to ask me if you are unsure about any changes, and let me know if there are updates that seem nuanced, complex, or extremely notable.
|
||||
Provide a summary of changes after the fact.
|
||||
|
||||
4. ASK IF I WANT TO PUBLISH TO NPM
|
||||
After you are done updating everything, remind me that I need to publish the changes to npm.
|
||||
|
||||
// TODO too sensitive for now
|
||||
// If yes, update `packages/llm-info/package.json` with the new version number and then
|
||||
// - use the terminal tool to commit the changes
|
||||
// - use the terminal tool to publish changes to npm
|
||||
// If you do not see a tool for running terminal commands, let me know.
|
||||
|
||||
// User input
|
||||
Please update LLM Info for the following providers. If "all", update all providers mentioned above:
|
||||
|
|
@ -184,7 +184,7 @@ export class Core {
|
|||
return;
|
||||
}
|
||||
|
||||
await this.codeBaseIndexer.refreshCodebaseIndex(dirs);
|
||||
void this.codeBaseIndexer.refreshCodebaseIndex(dirs);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,13 @@ class ContinueProxy extends OpenAI {
|
|||
}
|
||||
|
||||
supportsCompletions(): boolean {
|
||||
return true;
|
||||
// This was a hotfix and contains duplicate logic from class-specific completion support methods
|
||||
if (this.underlyingProviderName === "vllm") {
|
||||
return true;
|
||||
}
|
||||
// other providers that don't support completions include groq, mistral, nvidia, deepseek, etc.
|
||||
// For now disabling all except vllm
|
||||
return false;
|
||||
}
|
||||
|
||||
supportsFim(): boolean {
|
||||
|
|
|
|||
9
core/package-lock.json
generated
9
core/package-lock.json
generated
|
|
@ -14,7 +14,7 @@
|
|||
"@aws-sdk/credential-providers": "^3.778.0",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "file:../packages/config-yaml",
|
||||
"@continuedev/fetch": "^1.0.10",
|
||||
"@continuedev/fetch": "^1.0.13",
|
||||
"@continuedev/llm-info": "^1.0.8",
|
||||
"@continuedev/openai-adapters": "^1.0.25",
|
||||
"@modelcontextprotocol/sdk": "^1.12.0",
|
||||
|
|
@ -2928,10 +2928,9 @@
|
|||
"link": true
|
||||
},
|
||||
"node_modules/@continuedev/fetch": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.10.tgz",
|
||||
"integrity": "sha512-RBUXtm/VDz+9Itgw+CxrHXwVXoHCAedGzPOgA7gS5HZ9lObaeCJgEfzmfbln1ocFsfqSFmn5X5wSE7DHgfxpVA==",
|
||||
"license": "Apache-2.0",
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.13.tgz",
|
||||
"integrity": "sha512-7vwsefFBozsutv355zD7mEhFfl6UT4KXRH1QXRzjdbCaYneiRdFLe6UAwV2wGnH71Lj76gOLnTlcGoTV357OZg==",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.5",
|
||||
"follow-redirects": "^1.15.6",
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
"@aws-sdk/credential-providers": "^3.778.0",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "file:../packages/config-yaml",
|
||||
"@continuedev/fetch": "^1.0.10",
|
||||
"@continuedev/fetch": "^1.0.13",
|
||||
"@continuedev/llm-info": "^1.0.8",
|
||||
"@continuedev/openai-adapters": "^1.0.25",
|
||||
"@modelcontextprotocol/sdk": "^1.12.0",
|
||||
|
|
|
|||
|
|
@ -10,13 +10,25 @@ import {
|
|||
|
||||
const asyncExec = util.promisify(childProcess.exec);
|
||||
|
||||
const ENABLED_FOR_REMOTES = [
|
||||
"",
|
||||
"local",
|
||||
"wsl",
|
||||
"dev-container",
|
||||
"devcontainer",
|
||||
"ssh-remote",
|
||||
"attached-container",
|
||||
"codespaces",
|
||||
"tunnel",
|
||||
];
|
||||
|
||||
export const runTerminalCommandImpl: ToolImpl = async (args, extras) => {
|
||||
// Default to waiting for completion if not specified
|
||||
const waitForCompletion = args.waitForCompletion !== false;
|
||||
const ideInfo = await extras.ide.getIdeInfo();
|
||||
const toolCallId = extras.toolCallId || "";
|
||||
|
||||
if (ideInfo.remoteName === "local" || ideInfo.remoteName === "") {
|
||||
if (ENABLED_FOR_REMOTES.includes(ideInfo.remoteName)) {
|
||||
// For streaming output
|
||||
if (extras.onPartialOutput) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -84,5 +84,3 @@ export function modifyConfig(config: Config): Config {
|
|||
return config;
|
||||
}
|
||||
```
|
||||
|
||||
For examples of how to use `config.ts`, see [writing custom slash commands](../tutorials/build-your-own-slash-command.md#custom-slash-commands) or [writing custom context providers](../tutorials/build-your-own-context-provider.mdx).
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
---
|
||||
title: Build your own slash command
|
||||
---
|
||||
|
||||
:::info
|
||||
Slash commands can currently only be added using [`config.json`](../../json-reference.md) or `config.ts`. The [`YAML Config Format`](../../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../deep-dives/prompts.md) to achieve similar functionality.
|
||||
:::
|
||||
|
||||
There are two ways to add custom slash commands:
|
||||
|
||||
1. With natural language prompts - this is simpler and only requires writing a string or string template.
|
||||
2. With a custom function - this gives you full access to the Continue SDK and allows you to write arbitrary Typescript code.
|
||||
|
||||
### "Custom Commands" (Use Natural Language)
|
||||
|
||||
You can add custom slash commands by adding to the `customCommands` property in `config.json`.
|
||||
|
||||
- `name`: the name of the command, which will be invoked with `/name`
|
||||
- `description`: a short description of the command, which will appear in the dropdown
|
||||
- `prompt`: a templated prompt to send to the LLM
|
||||
|
||||
Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"customCommands": [
|
||||
{
|
||||
"name": "check",
|
||||
"description": "Check for mistakes in my code",
|
||||
"prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Templating
|
||||
|
||||
The `prompt` property supports templating with Handlebars syntax. You can use the following variables:
|
||||
|
||||
- `input` (used in the example above): any additional input entered with the slash command. For example, if you type `/test only write one test`, `input` will be `only write one test`. This will also include highlighted code blocks.
|
||||
- File names: You can reference any file by providing an absolute path or a path relative to the current working directory.
|
||||
|
||||
### Custom Slash Commands
|
||||
|
||||
If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`.
|
||||
|
||||
To do this, push a new `SlashCommand` object to the `slashCommands` list. This object contains "name", the name that you will type to invoke the slash command, "description", the description seen in the dropdown menu, and "run". The `run` function is any async generator that should yield strings as you want them to be streamed to the UI. As an argument to the function, you have access to a `ContinueSDK` object with utilities such as access to certain information/actions within the IDE, the current language model, and a few other utilities. For example, here is a slash command that generates a commit message:
|
||||
|
||||
```typescript title="~/.continue/config.ts"
|
||||
export function modifyConfig(config: Config): Config {
|
||||
config.slashCommands?.push({
|
||||
name: "commit",
|
||||
description: "Write a commit message",
|
||||
run: async function* (sdk) {
|
||||
// The getDiff function takes a boolean parameter that indicates whether
|
||||
// to include unstaged changes in the diff or not.
|
||||
const diff = await sdk.ide.getDiff(false); // Pass false to exclude unstaged changes
|
||||
for await (const message of sdk.llm.streamComplete(
|
||||
`${diff}\n\nWrite a commit message for the above changes. Use no more than 20 tokens to give a brief description in the imperative mood (e.g. 'Add feature' not 'Added feature'):`,
|
||||
new AbortController().signal,
|
||||
{
|
||||
maxTokens: 20,
|
||||
},
|
||||
)) {
|
||||
yield message;
|
||||
}
|
||||
},
|
||||
});
|
||||
return config;
|
||||
}
|
||||
```
|
||||
|
|
@ -385,8 +385,6 @@ Example:
|
|||
}
|
||||
```
|
||||
|
||||
You can also add your own slash command by following [this tutorial](./customize/tutorials/build-your-own-slash-command.md).
|
||||
|
||||
### `customCommands`
|
||||
|
||||
User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "1.1.42",
|
||||
"version": "1.1.44",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
"homepage": "https://continue.dev",
|
||||
"qna": "https://github.com/continuedev/continue/issues/new/choose",
|
||||
"license": "Apache-2.0",
|
||||
"displayName": "Continue - Codestral, Claude, and more",
|
||||
"displayName": "Continue",
|
||||
"pricing": "Free",
|
||||
"description": "The leading open-source AI code assistant",
|
||||
"publisher": "Continue",
|
||||
|
|
@ -41,15 +41,14 @@
|
|||
],
|
||||
"keywords": [
|
||||
"chatgpt",
|
||||
"cline",
|
||||
"roo",
|
||||
"github",
|
||||
"copilot",
|
||||
"claude",
|
||||
"sonnet",
|
||||
"mistral",
|
||||
"codestral",
|
||||
"codegpt",
|
||||
"ai",
|
||||
"llama"
|
||||
"ai"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onUri",
|
||||
|
|
|
|||
20
gui/package-lock.json
generated
20
gui/package-lock.json
generated
|
|
@ -12377,9 +12377,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "6.3.4",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz",
|
||||
"integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==",
|
||||
"version": "6.3.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz",
|
||||
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -12879,10 +12879,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite-node/node_modules/vite": {
|
||||
"version": "5.4.18",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz",
|
||||
"integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==",
|
||||
"version": "5.4.19",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz",
|
||||
"integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
"postcss": "^8.4.43",
|
||||
|
|
@ -13461,10 +13462,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vitest/node_modules/vite": {
|
||||
"version": "5.4.18",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz",
|
||||
"integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==",
|
||||
"version": "5.4.19",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz",
|
||||
"integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
"postcss": "^8.4.43",
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@ import {
|
|||
} from "../../redux/selectors/selectCurrentToolCall";
|
||||
import { selectSelectedChatModel } from "../../redux/slices/configSlice";
|
||||
import { exitEdit } from "../../redux/thunks/edit";
|
||||
import {
|
||||
getAltKeyLabel,
|
||||
getMetaKeyLabel,
|
||||
isMetaEquivalentKeyPressed,
|
||||
} from "../../util";
|
||||
import { getAltKeyLabel, isMetaEquivalentKeyPressed } from "../../util";
|
||||
import { ToolTip } from "../gui/Tooltip";
|
||||
import ModelSelect from "../modelSelection/ModelSelect";
|
||||
import { ModeSelect } from "../ModeSelect";
|
||||
|
|
@ -160,32 +156,28 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
<div
|
||||
className={`${toolsSupported ? "md:flex" : "int:flex"} hover:underline" hidden transition-colors duration-200`}
|
||||
>
|
||||
{props.activeKey === "Alt" ? (
|
||||
<HoverItem className="underline">
|
||||
{`${getAltKeyLabel()}⏎
|
||||
${useActiveFile ? "No active file" : "Active file"}`}
|
||||
</HoverItem>
|
||||
) : (
|
||||
<HoverItem
|
||||
className={props.activeKey === "Meta" ? "underline" : ""}
|
||||
onClick={(e) =>
|
||||
props.onEnter?.({
|
||||
useCodebase: true,
|
||||
noContext: !useActiveFile,
|
||||
})
|
||||
}
|
||||
>
|
||||
<span data-tooltip-id="add-codebase-context-tooltip">
|
||||
{getMetaKeyLabel()}⏎ @codebase
|
||||
</span>
|
||||
<ToolTip id="add-codebase-context-tooltip" place="top-end">
|
||||
Send With Codebase as Context ({getMetaKeyLabel()}⏎)
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
)}
|
||||
<HoverItem
|
||||
className={props.activeKey === "Alt" ? "underline" : ""}
|
||||
onClick={(e) =>
|
||||
props.onEnter?.({
|
||||
useCodebase: false,
|
||||
noContext: !useActiveFile,
|
||||
})
|
||||
}
|
||||
>
|
||||
<span data-tooltip-id="add-active-file-context-tooltip">
|
||||
{getAltKeyLabel()}⏎{" "}
|
||||
{useActiveFile ? "No active file" : "Active file"}
|
||||
</span>
|
||||
<ToolTip id="add-active-file-context-tooltip" place="top-end">
|
||||
{useActiveFile
|
||||
? "Send Without Active File"
|
||||
: "Send With Active File"}{" "}
|
||||
({getAltKeyLabel()}⏎)
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isInEdit && (
|
||||
<HoverItem
|
||||
className="hidden hover:underline sm:flex"
|
||||
|
|
|
|||
917
packages/fetch/package-lock.json
generated
917
packages/fetch/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/fetch",
|
||||
"version": "1.0.12",
|
||||
"version": "1.0.13",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
|||
22
packages/llm-info/package-lock.json
generated
22
packages/llm-info/package-lock.json
generated
|
|
@ -1,17 +1,28 @@
|
|||
{
|
||||
"name": "@continuedev/llm-info",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@continuedev/llm-info",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.9",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.15.29",
|
||||
"typescript": "^5.5.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.15.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz",
|
||||
"integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
|
||||
|
|
@ -24,6 +35,13 @@
|
|||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/llm-info",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
"author": "Nate Sesti and Ty Dunn",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.15.29",
|
||||
"typescript": "^5.5.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,45 @@
|
|||
import { AllMediaTypes, ModelProvider } from "../types.js";
|
||||
|
||||
// See https://ai.google.dev/gemini-api/docs/models
|
||||
export const Gemini: ModelProvider = {
|
||||
models: [
|
||||
{
|
||||
model: "gemini-2.0-flash",
|
||||
model: "gemini-2.5-pro-preview-05-06",
|
||||
displayName: "Gemini 2.5 Pro Preview",
|
||||
description:
|
||||
"Google's most advanced model with strong reasoning, multimodal capabilities, and advanced coding skills",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 65536,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-2\.5-pro-preview/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.5-pro-exp-03-25",
|
||||
displayName: "Gemini 2.5 Pro Experimental",
|
||||
description:
|
||||
"Experimental release of Gemini 2.5 Pro with 1M token context window",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 65536,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-2\.5-pro-exp/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.5-flash-preview-05-20",
|
||||
displayName: "Gemini 2.5 Flash Preview",
|
||||
description:
|
||||
"Fast, token-efficient multimodal model for complex tasks with 1M context window",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 65536,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-2\.5-flash-preview/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.0-flash", // stable gemini-2.0-flash-001
|
||||
displayName: "Gemini 2.0 Flash",
|
||||
description: "Fast, efficient model with strong multimodal capabilities",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
|
|
@ -12,58 +47,94 @@ export const Gemini: ModelProvider = {
|
|||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.0-flash-lite",
|
||||
model: "gemini-2.0-flash-lite", // stable gemini-2.0-flash-lite-001
|
||||
displayName: "Gemini 2.0 Flash Lite",
|
||||
description:
|
||||
"Small, fast model with reduced latency and memory requirements",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-2\.0-flash-lite/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.0-flash-preview-image-generation",
|
||||
displayName: "Gemini 2.0 Flash Image Generation Preview",
|
||||
description:
|
||||
"Model with image generation capabilities and improved visual quality",
|
||||
contextLength: 32000,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-2\.0-flash-preview-image-generation/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.0-flash-exp-image-generation",
|
||||
displayName: "Gemini 2.0 Flash Image Generation",
|
||||
contextLength: 32768,
|
||||
displayName: "Gemini 2.0 Flash Image Generation Experimental",
|
||||
description: "Experimental model with image generation capabilities",
|
||||
contextLength: 32000,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-2\.0-flash-exp-image-generation/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-2.5-pro-exp-03-25",
|
||||
displayName: "Gemini 2.5 Pro Exp",
|
||||
model: "gemini-2.0-flash-exp",
|
||||
displayName: "Gemini 2.0 Flash Experimental",
|
||||
description:
|
||||
"Experimental version of Gemini 2.0 Flash with extended capabilities",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 65536,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-2\.5-pro-exp-03-25/i,
|
||||
regex: /gemini-2\.0-flash-exp/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-1.5-flash",
|
||||
displayName: "Gemini 1.5 Flash",
|
||||
description: "Fast multimodal model with 1M token context window",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-1\.5-flash/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-1.5-flash-8b",
|
||||
displayName: "Gemini 1.5 Flash 8b",
|
||||
description:
|
||||
"Smaller version of Gemini 1.5 Flash optimized for efficiency",
|
||||
contextLength: 1048576,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-1\.5-flash-8b/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-1.5-pro",
|
||||
displayName: "Gemini 1.5 Pro",
|
||||
description:
|
||||
"Mid-size multimodal model capable of handling extensive inputs and complex reasoning tasks",
|
||||
contextLength: 2097152,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-1\.5-pro/i,
|
||||
recommendedFor: ["chat"],
|
||||
},
|
||||
{
|
||||
model: "gemini-1.0-pro",
|
||||
displayName: "Gemini 1.0 Pro",
|
||||
description: "First generation Gemini pro model",
|
||||
contextLength: 32768,
|
||||
maxCompletionTokens: 8192,
|
||||
mediaTypes: AllMediaTypes,
|
||||
regex: /gemini-1\.0-pro/i,
|
||||
},
|
||||
// embed
|
||||
{
|
||||
model: "models/text-embedding-004",
|
||||
displayName: "Gemini Text Embedding",
|
||||
description: "Text embedding model for vectorizing content",
|
||||
recommendedFor: ["embed"],
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue