@acentric/llm 0.0.0-stage → 0.1.0
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/README.md +128 -2
- package/dist/catalog/anthropic.d.ts +77 -0
- package/dist/catalog/anthropic.d.ts.map +1 -0
- package/dist/catalog/anthropic.js +73 -0
- package/dist/catalog/anthropic.js.map +1 -0
- package/dist/catalog/fireworks.d.ts +93 -0
- package/dist/catalog/fireworks.d.ts.map +1 -0
- package/dist/catalog/fireworks.js +117 -0
- package/dist/catalog/fireworks.js.map +1 -0
- package/dist/catalog/openai.d.ts +103 -0
- package/dist/catalog/openai.d.ts.map +1 -0
- package/dist/catalog/openai.js +102 -0
- package/dist/catalog/openai.js.map +1 -0
- package/dist/client/anthropic/errors.d.ts +4 -0
- package/dist/client/anthropic/errors.d.ts.map +1 -0
- package/dist/client/anthropic/errors.js +80 -0
- package/dist/client/anthropic/errors.js.map +1 -0
- package/dist/client/anthropic/request.d.ts +9 -0
- package/dist/client/anthropic/request.d.ts.map +1 -0
- package/dist/client/anthropic/request.js +232 -0
- package/dist/client/anthropic/request.js.map +1 -0
- package/dist/client/anthropic/response.d.ts +13 -0
- package/dist/client/anthropic/response.d.ts.map +1 -0
- package/dist/client/anthropic/response.js +207 -0
- package/dist/client/anthropic/response.js.map +1 -0
- package/dist/client/direct.d.ts +18 -0
- package/dist/client/direct.d.ts.map +1 -0
- package/dist/client/direct.js +104 -0
- package/dist/client/direct.js.map +1 -0
- package/dist/client/gateway.d.ts +43 -0
- package/dist/client/gateway.d.ts.map +1 -0
- package/dist/client/gateway.js +72 -0
- package/dist/client/gateway.js.map +1 -0
- package/dist/client/http.d.ts +41 -0
- package/dist/client/http.d.ts.map +1 -0
- package/dist/client/http.js +190 -0
- package/dist/client/http.js.map +1 -0
- package/dist/client/llm.d.ts +41 -0
- package/dist/client/llm.d.ts.map +1 -0
- package/dist/client/llm.js +100 -0
- package/dist/client/llm.js.map +1 -0
- package/dist/client/responses/errors.d.ts +13 -0
- package/dist/client/responses/errors.d.ts.map +1 -0
- package/dist/client/responses/errors.js +144 -0
- package/dist/client/responses/errors.js.map +1 -0
- package/dist/client/responses/profile.d.ts +50 -0
- package/dist/client/responses/profile.d.ts.map +1 -0
- package/dist/client/responses/profile.js +4 -0
- package/dist/client/responses/profile.js.map +1 -0
- package/dist/client/responses/providers.d.ts +4 -0
- package/dist/client/responses/providers.d.ts.map +1 -0
- package/dist/client/responses/providers.js +75 -0
- package/dist/client/responses/providers.js.map +1 -0
- package/dist/client/responses/request.d.ts +5 -0
- package/dist/client/responses/request.d.ts.map +1 -0
- package/dist/client/responses/request.js +248 -0
- package/dist/client/responses/request.js.map +1 -0
- package/dist/client/responses/response.d.ts +10 -0
- package/dist/client/responses/response.d.ts.map +1 -0
- package/dist/client/responses/response.js +176 -0
- package/dist/client/responses/response.js.map +1 -0
- package/dist/client/util.d.ts +21 -0
- package/dist/client/util.d.ts.map +1 -0
- package/dist/client/util.js +63 -0
- package/dist/client/util.js.map +1 -0
- package/dist/client.d.ts +9 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +10 -0
- package/dist/client.js.map +1 -0
- package/dist/content.d.ts +38 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/content.js +5 -0
- package/dist/content.js.map +1 -0
- package/dist/convert/anthropic.d.ts +3 -0
- package/dist/convert/anthropic.d.ts.map +1 -0
- package/dist/convert/anthropic.js +114 -0
- package/dist/convert/anthropic.js.map +1 -0
- package/dist/convert/index.d.ts +12 -0
- package/dist/convert/index.d.ts.map +1 -0
- package/dist/convert/index.js +221 -0
- package/dist/convert/index.js.map +1 -0
- package/dist/convert/responses.d.ts +3 -0
- package/dist/convert/responses.d.ts.map +1 -0
- package/dist/convert/responses.js +197 -0
- package/dist/convert/responses.js.map +1 -0
- package/dist/convert/types.d.ts +88 -0
- package/dist/convert/types.d.ts.map +1 -0
- package/dist/convert/types.js +3 -0
- package/dist/convert/types.js.map +1 -0
- package/dist/cost.d.ts +18 -0
- package/dist/cost.d.ts.map +1 -0
- package/dist/cost.js +49 -0
- package/dist/cost.js.map +1 -0
- package/dist/failure.d.ts +90 -0
- package/dist/failure.d.ts.map +1 -0
- package/dist/failure.js +111 -0
- package/dist/failure.js.map +1 -0
- package/dist/fields.d.ts +14 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +3 -0
- package/dist/fields.js.map +1 -0
- package/dist/formats/anthropic.d.ts +152 -0
- package/dist/formats/anthropic.d.ts.map +1 -0
- package/dist/formats/anthropic.js +7 -0
- package/dist/formats/anthropic.js.map +1 -0
- package/dist/formats/responses.d.ts +179 -0
- package/dist/formats/responses.d.ts.map +1 -0
- package/dist/formats/responses.js +9 -0
- package/dist/formats/responses.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/json.d.ts +6 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +10 -0
- package/dist/json.js.map +1 -0
- package/dist/messages.d.ts +82 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +4 -0
- package/dist/messages.js.map +1 -0
- package/dist/model.d.ts +36 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +4 -0
- package/dist/model.js.map +1 -0
- package/dist/models.d.ts +9 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +19 -0
- package/dist/models.js.map +1 -0
- package/dist/providers/anthropic.d.ts +130 -0
- package/dist/providers/anthropic.d.ts.map +1 -0
- package/dist/providers/anthropic.js +5 -0
- package/dist/providers/anthropic.js.map +1 -0
- package/dist/providers/fireworks.d.ts +108 -0
- package/dist/providers/fireworks.d.ts.map +1 -0
- package/dist/providers/fireworks.js +6 -0
- package/dist/providers/fireworks.js.map +1 -0
- package/dist/providers/openai.d.ts +193 -0
- package/dist/providers/openai.d.ts.map +1 -0
- package/dist/providers/openai.js +4 -0
- package/dist/providers/openai.js.map +1 -0
- package/dist/providers.d.ts +50 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +5 -0
- package/dist/providers.js.map +1 -0
- package/dist/read/anthropic.d.ts +15 -0
- package/dist/read/anthropic.d.ts.map +1 -0
- package/dist/read/anthropic.js +56 -0
- package/dist/read/anthropic.js.map +1 -0
- package/dist/read/responses.d.ts +26 -0
- package/dist/read/responses.d.ts.map +1 -0
- package/dist/read/responses.js +121 -0
- package/dist/read/responses.js.map +1 -0
- package/dist/read.d.ts +32 -0
- package/dist/read.d.ts.map +1 -0
- package/dist/read.js +73 -0
- package/dist/read.js.map +1 -0
- package/dist/request.d.ts +23 -0
- package/dist/request.d.ts.map +1 -0
- package/dist/request.js +4 -0
- package/dist/request.js.map +1 -0
- package/dist/response.d.ts +38 -0
- package/dist/response.d.ts.map +1 -0
- package/dist/response.js +4 -0
- package/dist/response.js.map +1 -0
- package/dist/secrets.d.ts +22 -0
- package/dist/secrets.d.ts.map +1 -0
- package/dist/secrets.js +35 -0
- package/dist/secrets.js.map +1 -0
- package/dist/tool-calls.d.ts +28 -0
- package/dist/tool-calls.d.ts.map +1 -0
- package/dist/tool-calls.js +4 -0
- package/dist/tool-calls.js.map +1 -0
- package/dist/tools.d.ts +33 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +4 -0
- package/dist/tools.js.map +1 -0
- package/dist/usage.d.ts +31 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +3 -0
- package/dist/usage.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +33 -3
- package/src/catalog/anthropic.ts +83 -0
- package/src/catalog/fireworks.ts +121 -0
- package/src/catalog/openai.ts +133 -0
- package/src/client/anthropic/errors.ts +88 -0
- package/src/client/anthropic/request.ts +272 -0
- package/src/client/anthropic/response.ts +236 -0
- package/src/client/direct.ts +157 -0
- package/src/client/gateway.ts +120 -0
- package/src/client/http.ts +231 -0
- package/src/client/llm.ts +151 -0
- package/src/client/responses/errors.ts +166 -0
- package/src/client/responses/profile.ts +55 -0
- package/src/client/responses/providers.ts +87 -0
- package/src/client/responses/request.ts +326 -0
- package/src/client/responses/response.ts +203 -0
- package/src/client/util.ts +81 -0
- package/src/client.ts +20 -0
- package/src/content.ts +46 -0
- package/src/convert/anthropic.ts +115 -0
- package/src/convert/index.ts +275 -0
- package/src/convert/responses.ts +203 -0
- package/src/convert/types.ts +104 -0
- package/src/cost.ts +71 -0
- package/src/failure.ts +164 -0
- package/src/fields.ts +13 -0
- package/src/formats/anthropic.ts +191 -0
- package/src/formats/responses.ts +207 -0
- package/src/index.ts +44 -0
- package/src/json.ts +13 -0
- package/src/messages.ts +99 -0
- package/src/model.ts +41 -0
- package/src/models.ts +23 -0
- package/src/providers/anthropic.ts +137 -0
- package/src/providers/fireworks.ts +140 -0
- package/src/providers/openai.ts +275 -0
- package/src/providers.ts +59 -0
- package/src/read/anthropic.ts +64 -0
- package/src/read/responses.ts +159 -0
- package/src/read.ts +108 -0
- package/src/request.ts +28 -0
- package/src/response.ts +44 -0
- package/src/secrets.ts +40 -0
- package/src/tool-calls.ts +33 -0
- package/src/tools.ts +38 -0
- package/src/usage.ts +33 -0
- package/src/version.ts +6 -0
package/README.md
CHANGED
|
@@ -1,3 +1,129 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @acentric/llm
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Calls LLM providers from an agent's handlers: Anthropic, OpenAI and Fireworks,
|
|
4
|
+
each used the way it is designed, directly or through the acentric gateway.
|
|
5
|
+
Its readers for replies, such as the tool calls a reply makes, are pure, so an
|
|
6
|
+
agent's step can use them too.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
// handlers.ts
|
|
10
|
+
import { createLlm } from '@acentric/llm/client';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
llm: {
|
|
14
|
+
mode: 'reissue',
|
|
15
|
+
run: (ctx) =>
|
|
16
|
+
createLlm(ctx).complete({
|
|
17
|
+
provider: 'anthropic',
|
|
18
|
+
model: 'claude-sonnet-5-5',
|
|
19
|
+
messages: ctx.args.messages,
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Two entries
|
|
26
|
+
|
|
27
|
+
| Import | For | May use |
|
|
28
|
+
| ---------------------- | -------------------------- | ---------------------------------- |
|
|
29
|
+
| `@acentric/llm` | the pure half and handlers | ECMAScript only: no I/O |
|
|
30
|
+
| `@acentric/llm/client` | handlers | `fetch`, and the handler's secrets |
|
|
31
|
+
|
|
32
|
+
## The pure entry
|
|
33
|
+
|
|
34
|
+
- **A conversation:** `UserMessage`, `SystemMessage`, `ToolResultMessage`,
|
|
35
|
+
`AssistantMessage<P>` (the provider's output as it is, sent back unchanged),
|
|
36
|
+
`NativeMessage<P>` (input only provider `P` takes, such as OpenAI's
|
|
37
|
+
compaction trigger) and `CustomMessage` (the application's own, never sent).
|
|
38
|
+
- **A call:** `LlmRequest<P>`, with no credentials, and `LlmResponse<P>`, with
|
|
39
|
+
the model that answered, the stop reason, usage and cost.
|
|
40
|
+
- **Each provider's own types:** its options, input and output items, and
|
|
41
|
+
response fields, for Anthropic Messages and the Responses format of OpenAI
|
|
42
|
+
and Fireworks.
|
|
43
|
+
- **Readers:** `outputText`, `refusals`, `reasoningSummary`, `toolCalls`,
|
|
44
|
+
`pendingToolCalls`; and `toolResult(call, content)`, which answers a call
|
|
45
|
+
with what its provider requires on the result.
|
|
46
|
+
- **Moving a conversation:** `convert(messages, { provider, model })` returns
|
|
47
|
+
the conversation ready for another provider or model, and every change it
|
|
48
|
+
made: reasoning bound to a model, provider items, citations, options on
|
|
49
|
+
parts that only another provider reads, tool call IDs Anthropic would
|
|
50
|
+
refuse. Messages already fit for the target come back unchanged.
|
|
51
|
+
- **Models:** `MODELS` and `findModel(provider, id)` give each model's context
|
|
52
|
+
window, output limit, input types and prices, and `estimateCost(usage,
|
|
53
|
+
pricing)` what a call cost. A model not listed still works.
|
|
54
|
+
- **Failures:** the client throws `LlmError`, whose `toJSON()` is what a runner
|
|
55
|
+
reports to step ([RUNNERS.md](../../RUNNERS.md#8-handlers)). In step,
|
|
56
|
+
`llmFailure(outcome)` reads it back: its `kind`, whether it is `retryable`,
|
|
57
|
+
and `retryAfterMs`.
|
|
58
|
+
|
|
59
|
+
Every type is the framework's `Json`, so a response can be a handler's result
|
|
60
|
+
and a message can be a log entry's body as they are.
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { llmFailure, pendingToolCalls } from '@acentric/llm';
|
|
64
|
+
|
|
65
|
+
// In step, when the model call's result arrives:
|
|
66
|
+
if ('ok' in message.outcome) {
|
|
67
|
+
const calls = pendingToolCalls(message.outcome.ok.message);
|
|
68
|
+
} else {
|
|
69
|
+
const failure = llmFailure(message.outcome);
|
|
70
|
+
if (failure?.retryable) {
|
|
71
|
+
// try again after failure.retryAfterMs, with a @timer
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## The client
|
|
77
|
+
|
|
78
|
+
`createLlm(ctx, options?)` takes a handler's context, or anything with its
|
|
79
|
+
`secrets` and `signal`, and returns `{ complete(request) }`:
|
|
80
|
+
|
|
81
|
+
- One call, one finished response: no streaming, and never retried. Whether
|
|
82
|
+
to try again is the agent's decision, from `llmFailure(outcome)` in step.
|
|
83
|
+
- The handler's signal stops the call: a cancelled or aborted effect fails
|
|
84
|
+
with `cancelled`, and a call past `timeoutMs` (15 minutes at most) with
|
|
85
|
+
`timeout`.
|
|
86
|
+
- The application's `custom` messages are left out of what is sent.
|
|
87
|
+
- `options.credentials`, `options.gateway` (or `false` to call providers
|
|
88
|
+
directly) and `options.fetch` override what the secrets say.
|
|
89
|
+
|
|
90
|
+
For a gateway, `callProvider(request, credentials)` makes one call to the
|
|
91
|
+
provider with credentials in hand, and `readCredentials` checks credentials,
|
|
92
|
+
such as keys read from configuration, before they are used. The gateway's
|
|
93
|
+
wire format is `GATEWAY_ROUTE`, `GatewayRequest`, `VERSION_HEADER` and
|
|
94
|
+
`GatewayFailure`:
|
|
95
|
+
|
|
96
|
+
- The request goes as it is, with no credentials, since the gateway calls
|
|
97
|
+
providers with its own keys.
|
|
98
|
+
- `effect` names the effect the call is made for: the `key`, `kind` and
|
|
99
|
+
`attempt` of the handler's context. A gateway shows calls under it, but it
|
|
100
|
+
is the caller's word, never a credential.
|
|
101
|
+
- The client's `LLM_VERSION` goes in the `VERSION_HEADER` header, so a
|
|
102
|
+
gateway can refuse a client newer than its own copy.
|
|
103
|
+
- The response comes back as it is, and `{ error: LlmFailure }` on failure.
|
|
104
|
+
|
|
105
|
+
The client uses only `fetch` and the web platform, so it runs in handlers
|
|
106
|
+
built for `node` and for `fetch`.
|
|
107
|
+
|
|
108
|
+
## Keys and the gateway
|
|
109
|
+
|
|
110
|
+
The client reads everything from the handler's secrets, never from the
|
|
111
|
+
environment, so the same code runs on every runner:
|
|
112
|
+
|
|
113
|
+
1. With a provider's key set, it calls that provider directly with it:
|
|
114
|
+
`ANTHROPIC_API_KEY`, `OPENAI_API_KEY` or `FIREWORKS_API_KEY`.
|
|
115
|
+
2. Otherwise, with `ACENTRIC_LLM_URL` and `ACENTRIC_LLM_TOKEN` set, it calls
|
|
116
|
+
the gateway at that address with that token, and the gateway calls the
|
|
117
|
+
provider with keys of its own.
|
|
118
|
+
|
|
119
|
+
So an agent can use its own account for one provider and the gateway for the
|
|
120
|
+
others. Options passed to the client override all of these. A secret that is
|
|
121
|
+
not set rejects with `SecretNotSet` on every runner
|
|
122
|
+
([RUNNERS.md](../../RUNNERS.md#8-handlers)), which is how the client tells
|
|
123
|
+
which are set.
|
|
124
|
+
|
|
125
|
+
The names are exported as `PROVIDER_SECRETS` and `GATEWAY_SECRETS`, and
|
|
126
|
+
`llmSecrets(env)` picks those that are set from an environment. `acentric dev`
|
|
127
|
+
and `acentric start` pass them to handlers on their own, from the environment
|
|
128
|
+
and `.env`; with the memory runner, pass `secrets: llmSecrets(process.env)`.
|
|
129
|
+
acentric-cloud sets the gateway's two for agents that use its gateway.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { ModelCost } from '../model.js';
|
|
2
|
+
export declare const ANTHROPIC_MODELS: readonly [{
|
|
3
|
+
readonly input: readonly ["text", "image", "file"];
|
|
4
|
+
readonly pricing: {
|
|
5
|
+
readonly base: ModelCost;
|
|
6
|
+
};
|
|
7
|
+
readonly contextWindow: 1000000;
|
|
8
|
+
readonly maxOutputTokens: 128000;
|
|
9
|
+
readonly provider: "anthropic";
|
|
10
|
+
readonly id: "claude-fable-5-1";
|
|
11
|
+
readonly name: "Claude Fable 5.1";
|
|
12
|
+
}, {
|
|
13
|
+
readonly input: readonly ["text", "image", "file"];
|
|
14
|
+
readonly pricing: {
|
|
15
|
+
readonly base: ModelCost;
|
|
16
|
+
};
|
|
17
|
+
readonly contextWindow: 1000000;
|
|
18
|
+
readonly maxOutputTokens: 128000;
|
|
19
|
+
readonly provider: "anthropic";
|
|
20
|
+
readonly id: "claude-opus-5-5";
|
|
21
|
+
readonly name: "Claude Opus 5.5";
|
|
22
|
+
}, {
|
|
23
|
+
readonly input: readonly ["text", "image", "file"];
|
|
24
|
+
readonly pricing: {
|
|
25
|
+
readonly base: ModelCost;
|
|
26
|
+
};
|
|
27
|
+
readonly contextWindow: 1000000;
|
|
28
|
+
readonly maxOutputTokens: 128000;
|
|
29
|
+
readonly provider: "anthropic";
|
|
30
|
+
readonly id: "claude-sonnet-5-5";
|
|
31
|
+
readonly name: "Claude Sonnet 5.5";
|
|
32
|
+
}, {
|
|
33
|
+
readonly input: readonly ["text", "image", "file"];
|
|
34
|
+
readonly pricing: {
|
|
35
|
+
readonly base: ModelCost;
|
|
36
|
+
readonly tiers: readonly [{
|
|
37
|
+
readonly aboveInputTokens: 100000;
|
|
38
|
+
readonly cost: ModelCost;
|
|
39
|
+
}];
|
|
40
|
+
};
|
|
41
|
+
readonly contextWindow: 1000000;
|
|
42
|
+
readonly maxOutputTokens: 128000;
|
|
43
|
+
readonly provider: "anthropic";
|
|
44
|
+
readonly id: "claude-haiku-5-5";
|
|
45
|
+
readonly name: "Claude Haiku 5.5";
|
|
46
|
+
}, {
|
|
47
|
+
readonly input: readonly ["text", "image", "file"];
|
|
48
|
+
readonly pricing: {
|
|
49
|
+
readonly base: ModelCost;
|
|
50
|
+
};
|
|
51
|
+
readonly contextWindow: 1000000;
|
|
52
|
+
readonly maxOutputTokens: 128000;
|
|
53
|
+
readonly provider: "anthropic";
|
|
54
|
+
readonly id: "claude-fable-5";
|
|
55
|
+
readonly name: "Claude Fable 5";
|
|
56
|
+
}, {
|
|
57
|
+
readonly input: readonly ["text", "image", "file"];
|
|
58
|
+
readonly pricing: {
|
|
59
|
+
readonly base: ModelCost;
|
|
60
|
+
};
|
|
61
|
+
readonly contextWindow: 1000000;
|
|
62
|
+
readonly maxOutputTokens: 128000;
|
|
63
|
+
readonly provider: "anthropic";
|
|
64
|
+
readonly id: "claude-opus-5";
|
|
65
|
+
readonly name: "Claude Opus 5";
|
|
66
|
+
}, {
|
|
67
|
+
readonly input: readonly ["text", "image", "file"];
|
|
68
|
+
readonly pricing: {
|
|
69
|
+
readonly base: ModelCost;
|
|
70
|
+
};
|
|
71
|
+
readonly contextWindow: 1000000;
|
|
72
|
+
readonly maxOutputTokens: 128000;
|
|
73
|
+
readonly provider: "anthropic";
|
|
74
|
+
readonly id: "claude-sonnet-5";
|
|
75
|
+
readonly name: "Claude Sonnet 5";
|
|
76
|
+
}];
|
|
77
|
+
//# sourceMappingURL=anthropic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../src/catalog/anthropic.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,aAAa,CAAC;AAexD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DyB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Claude 5 models. Standard prices in US dollars per million tokens, from
|
|
2
|
+
// https://platform.claude.com/docs/en/about-claude/pricing and the model pages,
|
|
3
|
+
// as of October 2026. A cache write costs 1.25 times the input price for five
|
|
4
|
+
// minutes and twice for an hour; reads are priced per model. Only Haiku 5.5
|
|
5
|
+
// has a long-context price: for the whole request, output included, once the
|
|
6
|
+
// prompt is over 100,000 tokens.
|
|
7
|
+
const LIMITS = { contextWindow: 1_000_000, maxOutputTokens: 128_000 };
|
|
8
|
+
const INPUT = ['text', 'image', 'file'];
|
|
9
|
+
function cost(input, output, cacheWrite, cacheWrite1h, cacheRead) {
|
|
10
|
+
return { input, output, cacheWrite, cacheWrite1h, cacheRead };
|
|
11
|
+
}
|
|
12
|
+
export const ANTHROPIC_MODELS = [
|
|
13
|
+
{
|
|
14
|
+
provider: 'anthropic',
|
|
15
|
+
id: 'claude-fable-5-1',
|
|
16
|
+
name: 'Claude Fable 5.1',
|
|
17
|
+
...LIMITS,
|
|
18
|
+
input: INPUT,
|
|
19
|
+
pricing: { base: cost(10, 50, 12.5, 20, 0.25) },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
provider: 'anthropic',
|
|
23
|
+
id: 'claude-opus-5-5',
|
|
24
|
+
name: 'Claude Opus 5.5',
|
|
25
|
+
...LIMITS,
|
|
26
|
+
input: INPUT,
|
|
27
|
+
pricing: { base: cost(4, 20, 5, 8, 0.2) },
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
provider: 'anthropic',
|
|
31
|
+
id: 'claude-sonnet-5-5',
|
|
32
|
+
name: 'Claude Sonnet 5.5',
|
|
33
|
+
...LIMITS,
|
|
34
|
+
input: INPUT,
|
|
35
|
+
pricing: { base: cost(2, 10, 2.5, 4, 0.1) },
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
provider: 'anthropic',
|
|
39
|
+
id: 'claude-haiku-5-5',
|
|
40
|
+
name: 'Claude Haiku 5.5',
|
|
41
|
+
...LIMITS,
|
|
42
|
+
input: INPUT,
|
|
43
|
+
pricing: {
|
|
44
|
+
base: cost(0.1, 0.5, 0.125, 0.2, 0.01),
|
|
45
|
+
tiers: [{ aboveInputTokens: 100_000, cost: cost(0.5, 2.5, 0.625, 1, 0.05) }],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
provider: 'anthropic',
|
|
50
|
+
id: 'claude-fable-5',
|
|
51
|
+
name: 'Claude Fable 5',
|
|
52
|
+
...LIMITS,
|
|
53
|
+
input: INPUT,
|
|
54
|
+
pricing: { base: cost(10, 50, 12.5, 20, 1) },
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
provider: 'anthropic',
|
|
58
|
+
id: 'claude-opus-5',
|
|
59
|
+
name: 'Claude Opus 5',
|
|
60
|
+
...LIMITS,
|
|
61
|
+
input: INPUT,
|
|
62
|
+
pricing: { base: cost(5, 25, 6.25, 10, 0.5) },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
provider: 'anthropic',
|
|
66
|
+
id: 'claude-sonnet-5',
|
|
67
|
+
name: 'Claude Sonnet 5',
|
|
68
|
+
...LIMITS,
|
|
69
|
+
input: INPUT,
|
|
70
|
+
pricing: { base: cost(2, 10, 2.5, 4, 0.2) },
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
//# sourceMappingURL=anthropic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../src/catalog/anthropic.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,iCAAiC;AAIjC,MAAM,MAAM,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,eA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AAG,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC;YACtC,KAAK,EAAE,CAAC,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC;SAC7E;KACF;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,gBAAgB;QACtB,GAAG,MAAM;QACT,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE;KAC7C;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,eAAe;QACrB,GAAG,MAAM;QACT,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE;KAC9C;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,iBAAiB;QACvB,GAAG,MAAM;QACT,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;KAC5C;CACmD,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { ModelPricing } from '../model.js';
|
|
2
|
+
export declare const FIREWORKS_MODELS: readonly [{
|
|
3
|
+
readonly provider: "fireworks";
|
|
4
|
+
readonly id: "accounts/fireworks/models/kimi-k3";
|
|
5
|
+
readonly name: "Kimi K3";
|
|
6
|
+
readonly contextWindow: 1048576;
|
|
7
|
+
readonly input: readonly ["text", "image"];
|
|
8
|
+
readonly pricing: ModelPricing;
|
|
9
|
+
}, {
|
|
10
|
+
readonly provider: "fireworks";
|
|
11
|
+
readonly id: "accounts/fireworks/routers/kimi-k3-fast";
|
|
12
|
+
readonly name: "Kimi K3 Fast";
|
|
13
|
+
readonly contextWindow: 1048576;
|
|
14
|
+
readonly input: readonly ["text", "image"];
|
|
15
|
+
readonly pricing: ModelPricing;
|
|
16
|
+
}, {
|
|
17
|
+
readonly provider: "fireworks";
|
|
18
|
+
readonly id: "accounts/fireworks/models/ember-1";
|
|
19
|
+
readonly name: "Ember-1";
|
|
20
|
+
readonly contextWindow: 1048576;
|
|
21
|
+
readonly input: readonly ["text", "image"];
|
|
22
|
+
readonly pricing: ModelPricing;
|
|
23
|
+
}, {
|
|
24
|
+
readonly provider: "fireworks";
|
|
25
|
+
readonly id: "accounts/fireworks/models/deepseek-v4p1-flash";
|
|
26
|
+
readonly name: "DeepSeek V4.1 Flash";
|
|
27
|
+
readonly contextWindow: 1048576;
|
|
28
|
+
readonly input: readonly ["text", "image"];
|
|
29
|
+
readonly pricing: ModelPricing;
|
|
30
|
+
}, {
|
|
31
|
+
readonly provider: "fireworks";
|
|
32
|
+
readonly id: "accounts/fireworks/models/glm-5p3";
|
|
33
|
+
readonly name: "GLM 5.3";
|
|
34
|
+
readonly contextWindow: 1048576;
|
|
35
|
+
readonly input: readonly ["text"];
|
|
36
|
+
readonly pricing: ModelPricing;
|
|
37
|
+
}, {
|
|
38
|
+
readonly provider: "fireworks";
|
|
39
|
+
readonly id: "accounts/fireworks/routers/glm-5p3-fast";
|
|
40
|
+
readonly name: "GLM 5.3 Fast";
|
|
41
|
+
readonly contextWindow: 1048576;
|
|
42
|
+
readonly input: readonly ["text"];
|
|
43
|
+
readonly pricing: ModelPricing;
|
|
44
|
+
}, {
|
|
45
|
+
readonly provider: "fireworks";
|
|
46
|
+
readonly id: "accounts/fireworks/models/glm-5p3-flash";
|
|
47
|
+
readonly name: "GLM 5.3 Flash";
|
|
48
|
+
readonly contextWindow: 1048576;
|
|
49
|
+
readonly input: readonly ["text", "image"];
|
|
50
|
+
readonly pricing: ModelPricing;
|
|
51
|
+
}, {
|
|
52
|
+
readonly provider: "fireworks";
|
|
53
|
+
readonly id: "accounts/fireworks/models/qwen3p8-max";
|
|
54
|
+
readonly name: "Qwen 3.8 Max";
|
|
55
|
+
readonly input: readonly ["text", "image"];
|
|
56
|
+
readonly pricing: ModelPricing;
|
|
57
|
+
}, {
|
|
58
|
+
readonly provider: "fireworks";
|
|
59
|
+
readonly id: "accounts/fireworks/models/minimax-m3";
|
|
60
|
+
readonly name: "MiniMax M3";
|
|
61
|
+
readonly contextWindow: 512000;
|
|
62
|
+
readonly input: readonly ["text"];
|
|
63
|
+
readonly pricing: ModelPricing;
|
|
64
|
+
}, {
|
|
65
|
+
readonly provider: "fireworks";
|
|
66
|
+
readonly id: "accounts/fireworks/models/gpt-oss-120b";
|
|
67
|
+
readonly name: "gpt-oss-120b";
|
|
68
|
+
readonly contextWindow: 131072;
|
|
69
|
+
readonly input: readonly ["text"];
|
|
70
|
+
readonly pricing: ModelPricing;
|
|
71
|
+
}, {
|
|
72
|
+
readonly provider: "fireworks";
|
|
73
|
+
readonly id: "accounts/fireworks/models/nemotron-lightning-3p5-30b-a3b";
|
|
74
|
+
readonly name: "Nemotron Lightning 3.5 30B A3B";
|
|
75
|
+
readonly contextWindow: 262144;
|
|
76
|
+
readonly input: readonly ["text"];
|
|
77
|
+
readonly pricing: ModelPricing;
|
|
78
|
+
}, {
|
|
79
|
+
readonly provider: "fireworks";
|
|
80
|
+
readonly id: "accounts/fireworks/models/nemotron-3-ultra-nvfp4";
|
|
81
|
+
readonly name: "Nemotron 3 Ultra (Preview)";
|
|
82
|
+
readonly contextWindow: 262144;
|
|
83
|
+
readonly input: readonly ["text"];
|
|
84
|
+
readonly pricing: ModelPricing;
|
|
85
|
+
}, {
|
|
86
|
+
readonly provider: "fireworks";
|
|
87
|
+
readonly id: "accounts/fireworks/models/inkling";
|
|
88
|
+
readonly name: "Inkling";
|
|
89
|
+
readonly contextWindow: 1048576;
|
|
90
|
+
readonly input: readonly ["text", "image"];
|
|
91
|
+
readonly pricing: ModelPricing;
|
|
92
|
+
}];
|
|
93
|
+
//# sourceMappingURL=fireworks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fireworks.d.ts","sourceRoot":"","sources":["../../src/catalog/fireworks.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,aAAa,CAAC;AAU3D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwGyB,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Fireworks serverless models. Standard prices in US dollars per million
|
|
2
|
+
// tokens, from https://docs.fireworks.ai/serverless/pricing and the model
|
|
3
|
+
// pages, as of October 2026. Fireworks has no long-context prices, charges
|
|
4
|
+
// nothing for cache writes and documents no output limit per model. The
|
|
5
|
+
// "fast" routers are model IDs of their own, with their own prices.
|
|
6
|
+
const VISION = ['text', 'image'];
|
|
7
|
+
const TEXT = ['text'];
|
|
8
|
+
const MILLION = 1_048_576;
|
|
9
|
+
function cost(input, cacheRead, output) {
|
|
10
|
+
return { base: { input, cacheRead, output } };
|
|
11
|
+
}
|
|
12
|
+
export const FIREWORKS_MODELS = [
|
|
13
|
+
{
|
|
14
|
+
provider: 'fireworks',
|
|
15
|
+
id: 'accounts/fireworks/models/kimi-k3',
|
|
16
|
+
name: 'Kimi K3',
|
|
17
|
+
contextWindow: MILLION,
|
|
18
|
+
input: VISION,
|
|
19
|
+
pricing: cost(3, 0.3, 15),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
provider: 'fireworks',
|
|
23
|
+
id: 'accounts/fireworks/routers/kimi-k3-fast',
|
|
24
|
+
name: 'Kimi K3 Fast',
|
|
25
|
+
contextWindow: MILLION,
|
|
26
|
+
input: VISION,
|
|
27
|
+
pricing: cost(4.5, 0.45, 22.5),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
provider: 'fireworks',
|
|
31
|
+
id: 'accounts/fireworks/models/ember-1',
|
|
32
|
+
name: 'Ember-1',
|
|
33
|
+
contextWindow: MILLION,
|
|
34
|
+
input: VISION,
|
|
35
|
+
pricing: cost(3, 0.3, 15),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
provider: 'fireworks',
|
|
39
|
+
id: 'accounts/fireworks/models/deepseek-v4p1-flash',
|
|
40
|
+
name: 'DeepSeek V4.1 Flash',
|
|
41
|
+
contextWindow: MILLION,
|
|
42
|
+
input: VISION,
|
|
43
|
+
pricing: cost(0.3, 0.006, 1.2),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
provider: 'fireworks',
|
|
47
|
+
id: 'accounts/fireworks/models/glm-5p3',
|
|
48
|
+
name: 'GLM 5.3',
|
|
49
|
+
contextWindow: MILLION,
|
|
50
|
+
input: TEXT,
|
|
51
|
+
pricing: cost(1.4, 0.26, 4.4),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
provider: 'fireworks',
|
|
55
|
+
id: 'accounts/fireworks/routers/glm-5p3-fast',
|
|
56
|
+
name: 'GLM 5.3 Fast',
|
|
57
|
+
contextWindow: MILLION,
|
|
58
|
+
input: TEXT,
|
|
59
|
+
pricing: cost(2.1, 0.39, 6.6),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
provider: 'fireworks',
|
|
63
|
+
id: 'accounts/fireworks/models/glm-5p3-flash',
|
|
64
|
+
name: 'GLM 5.3 Flash',
|
|
65
|
+
contextWindow: MILLION,
|
|
66
|
+
input: VISION,
|
|
67
|
+
pricing: cost(0.15, 0.03, 0.5),
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
provider: 'fireworks',
|
|
71
|
+
id: 'accounts/fireworks/models/qwen3p8-max',
|
|
72
|
+
name: 'Qwen 3.8 Max',
|
|
73
|
+
input: VISION,
|
|
74
|
+
pricing: cost(2, 0.25, 6),
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
provider: 'fireworks',
|
|
78
|
+
id: 'accounts/fireworks/models/minimax-m3',
|
|
79
|
+
name: 'MiniMax M3',
|
|
80
|
+
contextWindow: 512_000,
|
|
81
|
+
input: TEXT,
|
|
82
|
+
pricing: cost(0.3, 0.06, 1.2),
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
provider: 'fireworks',
|
|
86
|
+
id: 'accounts/fireworks/models/gpt-oss-120b',
|
|
87
|
+
name: 'gpt-oss-120b',
|
|
88
|
+
contextWindow: 131_072,
|
|
89
|
+
input: TEXT,
|
|
90
|
+
pricing: cost(0.15, 0.015, 0.6),
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
provider: 'fireworks',
|
|
94
|
+
id: 'accounts/fireworks/models/nemotron-lightning-3p5-30b-a3b',
|
|
95
|
+
name: 'Nemotron Lightning 3.5 30B A3B',
|
|
96
|
+
contextWindow: 262_144,
|
|
97
|
+
input: TEXT,
|
|
98
|
+
pricing: cost(0.05, 0.01, 0.2),
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
provider: 'fireworks',
|
|
102
|
+
id: 'accounts/fireworks/models/nemotron-3-ultra-nvfp4',
|
|
103
|
+
name: 'Nemotron 3 Ultra (Preview)',
|
|
104
|
+
contextWindow: 262_144,
|
|
105
|
+
input: TEXT,
|
|
106
|
+
pricing: cost(0.6, 0.12, 2.4),
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
provider: 'fireworks',
|
|
110
|
+
id: 'accounts/fireworks/models/inkling',
|
|
111
|
+
name: 'Inkling',
|
|
112
|
+
contextWindow: MILLION,
|
|
113
|
+
input: VISION,
|
|
114
|
+
pricing: cost(1, 0.17, 4.05),
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
//# sourceMappingURL=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CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC;KAChC;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,EAAE,EAAE,0DAA0D;QAC9D,IAAI,EAAE,gCAAgC;QACtC,aAAa,EAAE,OAAO;QACtB,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC;KAC/B;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,EAAE,EAAE,kDAAkD;QACtD,IAAI,EAAE,4BAA4B;QAClC,aAAa,EAAE,OAAO;QACtB,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC;KAC9B;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,EAAE,EAAE,mCAAmC;QACvC,IAAI,EAAE,SAAS;QACf,aAAa,EAAE,OAAO;QACtB,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;KAC7B;CACmD,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { ModelPricing } from '../model.js';
|
|
2
|
+
export declare const OPENAI_MODELS: readonly [{
|
|
3
|
+
readonly input: readonly ["text", "image"];
|
|
4
|
+
readonly pricing: ModelPricing;
|
|
5
|
+
readonly contextWindow: 1050000;
|
|
6
|
+
readonly maxOutputTokens: 128000;
|
|
7
|
+
readonly provider: "openai";
|
|
8
|
+
readonly id: "gpt-6-astra";
|
|
9
|
+
readonly name: "GPT-6 Astra";
|
|
10
|
+
}, {
|
|
11
|
+
readonly input: readonly ["text", "image"];
|
|
12
|
+
readonly pricing: ModelPricing;
|
|
13
|
+
readonly contextWindow: 1050000;
|
|
14
|
+
readonly maxOutputTokens: 128000;
|
|
15
|
+
readonly provider: "openai";
|
|
16
|
+
readonly id: "gpt-6.1-sol";
|
|
17
|
+
readonly name: "GPT-6.1 Sol";
|
|
18
|
+
}, {
|
|
19
|
+
readonly input: readonly ["text", "image"];
|
|
20
|
+
readonly pricing: ModelPricing;
|
|
21
|
+
readonly contextWindow: 1050000;
|
|
22
|
+
readonly maxOutputTokens: 128000;
|
|
23
|
+
readonly provider: "openai";
|
|
24
|
+
readonly id: "gpt-6-sol";
|
|
25
|
+
readonly name: "GPT-6 Sol";
|
|
26
|
+
}, {
|
|
27
|
+
readonly input: readonly ["text", "image"];
|
|
28
|
+
readonly pricing: ModelPricing;
|
|
29
|
+
readonly contextWindow: 1050000;
|
|
30
|
+
readonly maxOutputTokens: 128000;
|
|
31
|
+
readonly provider: "openai";
|
|
32
|
+
readonly id: "gpt-6-luna";
|
|
33
|
+
readonly name: "GPT-6 Luna";
|
|
34
|
+
}, {
|
|
35
|
+
readonly input: readonly ["text", "image"];
|
|
36
|
+
readonly pricing: ModelPricing;
|
|
37
|
+
readonly contextWindow: 1050000;
|
|
38
|
+
readonly maxOutputTokens: 128000;
|
|
39
|
+
readonly provider: "openai";
|
|
40
|
+
readonly id: "gpt-5.6-sol";
|
|
41
|
+
readonly name: "GPT-5.6 Sol";
|
|
42
|
+
}, {
|
|
43
|
+
readonly input: readonly ["text", "image"];
|
|
44
|
+
readonly pricing: ModelPricing;
|
|
45
|
+
readonly contextWindow: 1050000;
|
|
46
|
+
readonly maxOutputTokens: 128000;
|
|
47
|
+
readonly provider: "openai";
|
|
48
|
+
readonly id: "gpt-5.6-terra";
|
|
49
|
+
readonly name: "GPT-5.6 Terra";
|
|
50
|
+
}, {
|
|
51
|
+
readonly input: readonly ["text", "image"];
|
|
52
|
+
readonly pricing: ModelPricing;
|
|
53
|
+
readonly contextWindow: 1050000;
|
|
54
|
+
readonly maxOutputTokens: 128000;
|
|
55
|
+
readonly provider: "openai";
|
|
56
|
+
readonly id: "gpt-5.6-luna";
|
|
57
|
+
readonly name: "GPT-5.6 Luna";
|
|
58
|
+
}, {
|
|
59
|
+
readonly input: readonly ["text", "image"];
|
|
60
|
+
readonly pricing: ModelPricing;
|
|
61
|
+
readonly contextWindow: 1050000;
|
|
62
|
+
readonly maxOutputTokens: 128000;
|
|
63
|
+
readonly provider: "openai";
|
|
64
|
+
readonly id: "gpt-5.5";
|
|
65
|
+
readonly name: "GPT-5.5";
|
|
66
|
+
}, {
|
|
67
|
+
readonly input: readonly ["text", "image"];
|
|
68
|
+
readonly pricing: ModelPricing;
|
|
69
|
+
readonly contextWindow: 1050000;
|
|
70
|
+
readonly maxOutputTokens: 128000;
|
|
71
|
+
readonly provider: "openai";
|
|
72
|
+
readonly id: "gpt-5.4";
|
|
73
|
+
readonly name: "GPT-5.4";
|
|
74
|
+
}, {
|
|
75
|
+
readonly provider: "openai";
|
|
76
|
+
readonly id: "gpt-5.4-mini";
|
|
77
|
+
readonly name: "GPT-5.4 mini";
|
|
78
|
+
readonly contextWindow: 400000;
|
|
79
|
+
readonly maxOutputTokens: 128000;
|
|
80
|
+
readonly input: readonly ["text", "image"];
|
|
81
|
+
readonly pricing: {
|
|
82
|
+
readonly base: {
|
|
83
|
+
readonly input: 0.75;
|
|
84
|
+
readonly cacheRead: 0.075;
|
|
85
|
+
readonly output: 4.5;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
readonly provider: "openai";
|
|
90
|
+
readonly id: "gpt-4.1";
|
|
91
|
+
readonly name: "GPT-4.1";
|
|
92
|
+
readonly contextWindow: 1047576;
|
|
93
|
+
readonly maxOutputTokens: 32768;
|
|
94
|
+
readonly input: readonly ["text", "image"];
|
|
95
|
+
readonly pricing: {
|
|
96
|
+
readonly base: {
|
|
97
|
+
readonly input: 2;
|
|
98
|
+
readonly cacheRead: 0.5;
|
|
99
|
+
readonly output: 8;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}];
|
|
103
|
+
//# sourceMappingURL=openai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../src/catalog/openai.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAwB,YAAY,EAAE,MAAM,aAAa,CAAC;AAStE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsHyB,CAAC"}
|