mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 16:01:05 +00:00
Release v0.12.10
This commit is contained in:
parent
47bb302155
commit
c7585e37c9
15 changed files with 101 additions and 128 deletions
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.12.10] - 2025-12-04
|
||||
|
||||
### Added
|
||||
|
||||
- Added `gpt-5.1-codex-max` model support
|
||||
|
||||
### Fixed
|
||||
|
||||
- **OpenAI Token Counting**: Fixed `usage.input` to exclude cached tokens for OpenAI providers. Previously, `input` included cached tokens, causing double-counting when calculating total context size via `input + cacheRead`. Now `input` represents non-cached input tokens across all providers, making `input + output + cacheRead + cacheWrite` the correct formula for total context size.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-ai",
|
||||
"version": "0.12.9",
|
||||
"version": "0.12.10",
|
||||
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
|
|
|||
|
|
@ -344,6 +344,26 @@ async function generateModels() {
|
|||
});
|
||||
}
|
||||
|
||||
if (!allModels.some(m => m.provider === "openai" && m.id === "gpt-5.1-codex-max")) {
|
||||
allModels.push({
|
||||
id: "gpt-5.1-codex-max",
|
||||
name: "GPT-5.1 Codex Max",
|
||||
api: "openai-responses",
|
||||
baseUrl: "https://api.openai.com/v1",
|
||||
provider: "openai",
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1.25,
|
||||
output: 10,
|
||||
cacheRead: 0.125,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 400000,
|
||||
maxTokens: 128000,
|
||||
});
|
||||
}
|
||||
|
||||
// Add missing Grok models
|
||||
if (!allModels.some(m => m.provider === "xai" && m.id === "grok-code-fast-1")) {
|
||||
allModels.push({
|
||||
|
|
|
|||
|
|
@ -1199,6 +1199,23 @@ export const MODELS = {
|
|||
contextWindow: 128000,
|
||||
maxTokens: 16384,
|
||||
} satisfies Model<"openai-responses">,
|
||||
"gpt-5.1-codex-max": {
|
||||
id: "gpt-5.1-codex-max",
|
||||
name: "GPT-5.1 Codex Max",
|
||||
api: "openai-responses",
|
||||
provider: "openai",
|
||||
baseUrl: "https://api.openai.com/v1",
|
||||
reasoning: true,
|
||||
input: ["text", "image"],
|
||||
cost: {
|
||||
input: 1.25,
|
||||
output: 10,
|
||||
cacheRead: 0.125,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 400000,
|
||||
maxTokens: 128000,
|
||||
} satisfies Model<"openai-responses">,
|
||||
},
|
||||
groq: {
|
||||
"llama-3.1-8b-instant": {
|
||||
|
|
@ -3861,23 +3878,6 @@ export const MODELS = {
|
|||
contextWindow: 131072,
|
||||
maxTokens: 4096,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/magistral-small-2506": {
|
||||
id: "mistralai/magistral-small-2506",
|
||||
name: "Mistral: Magistral Small 2506",
|
||||
api: "openai-completions",
|
||||
provider: "openrouter",
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.5,
|
||||
output: 1.5,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 40000,
|
||||
maxTokens: 40000,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/magistral-medium-2506:thinking": {
|
||||
id: "mistralai/magistral-medium-2506:thinking",
|
||||
name: "Mistral: Magistral Medium 2506 (thinking)",
|
||||
|
|
@ -3895,23 +3895,6 @@ export const MODELS = {
|
|||
contextWindow: 40960,
|
||||
maxTokens: 40000,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/magistral-medium-2506": {
|
||||
id: "mistralai/magistral-medium-2506",
|
||||
name: "Mistral: Magistral Medium 2506",
|
||||
api: "openai-completions",
|
||||
provider: "openrouter",
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 2,
|
||||
output: 5,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 40960,
|
||||
maxTokens: 40000,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"google/gemini-2.5-pro-preview": {
|
||||
id: "google/gemini-2.5-pro-preview",
|
||||
name: "Google: Gemini 2.5 Pro Preview 06-05",
|
||||
|
|
@ -3980,23 +3963,6 @@ export const MODELS = {
|
|||
contextWindow: 1000000,
|
||||
maxTokens: 64000,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/devstral-small-2505": {
|
||||
id: "mistralai/devstral-small-2505",
|
||||
name: "Mistral: Devstral Small 2505",
|
||||
api: "openai-completions",
|
||||
provider: "openrouter",
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.06,
|
||||
output: 0.12,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 128000,
|
||||
maxTokens: 4096,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"openai/codex-mini": {
|
||||
id: "openai/codex-mini",
|
||||
name: "OpenAI: Codex Mini",
|
||||
|
|
@ -4397,13 +4363,13 @@ export const MODELS = {
|
|||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.19999999999999998,
|
||||
output: 0.88,
|
||||
cacheRead: 0.106,
|
||||
input: 0.15,
|
||||
output: 0.7,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 163840,
|
||||
maxTokens: 4096,
|
||||
contextWindow: 8192,
|
||||
maxTokens: 7168,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/mistral-small-3.1-24b-instruct:free": {
|
||||
id: "mistralai/mistral-small-3.1-24b-instruct:free",
|
||||
|
|
@ -4711,23 +4677,6 @@ export const MODELS = {
|
|||
contextWindow: 163840,
|
||||
maxTokens: 4096,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/codestral-2501": {
|
||||
id: "mistralai/codestral-2501",
|
||||
name: "Mistral: Codestral 2501",
|
||||
api: "openai-completions",
|
||||
provider: "openrouter",
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.3,
|
||||
output: 0.8999999999999999,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 256000,
|
||||
maxTokens: 4096,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"deepseek/deepseek-chat": {
|
||||
id: "deepseek/deepseek-chat",
|
||||
name: "DeepSeek: DeepSeek V3",
|
||||
|
|
@ -5595,23 +5544,6 @@ export const MODELS = {
|
|||
contextWindow: 128000,
|
||||
maxTokens: 4096,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/mistral-small": {
|
||||
id: "mistralai/mistral-small",
|
||||
name: "Mistral Small",
|
||||
api: "openai-completions",
|
||||
provider: "openrouter",
|
||||
baseUrl: "https://openrouter.ai/api/v1",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: {
|
||||
input: 0.19999999999999998,
|
||||
output: 0.6,
|
||||
cacheRead: 0,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
contextWindow: 32768,
|
||||
maxTokens: 4096,
|
||||
} satisfies Model<"openai-completions">,
|
||||
"mistralai/mistral-tiny": {
|
||||
id: "mistralai/mistral-tiny",
|
||||
name: "Mistral Tiny",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue