mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-21 11:29:29 -10:00
Use regular GPT-5.6 Sol token prices
This commit is contained in:
1 parent
24488dc483
commit
f4568a20c7
3 files changed
+13
-15
No files matched your search
@@ -813,8 +813,6 @@ describe('OpenAiResponsesChatProvider.complete non-stream output', () => {
|
||||
cached_tokens: 10,
|
||||
});
|
||||
|
||||
// gpt-5.6-sol costs: prompt=400, completion=2000, cached=40.
|
||||
const sol = OPEN_AI_MODELS.find((m) => m.id === 'gpt-5.6-sol')!;
|
||||
expect(recordSpy).toHaveBeenCalledTimes(1);
|
||||
const [usage, actor, prefix, overrides] = recordSpy.mock.calls[0]!;
|
||||
expect(actor).toBe(SYSTEM_ACTOR);
|
||||
@@ -825,9 +823,9 @@ describe('OpenAiResponsesChatProvider.complete non-stream output', () => {
|
||||
cached_tokens: 10,
|
||||
});
|
||||
expect(overrides).toEqual({
|
||||
prompt_tokens: 90 * Number(sol.costs.prompt_tokens),
|
||||
completion_tokens: 50 * Number(sol.costs.completion_tokens),
|
||||
cached_tokens: 10 * Number(sol.costs.cached_tokens ?? 0),
|
||||
prompt_tokens: 90 * 500,
|
||||
completion_tokens: 50 * 3000,
|
||||
cached_tokens: 10 * 50,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1168,15 +1166,13 @@ describe('OpenAiResponsesChatProvider.complete streaming', () => {
|
||||
cached_tokens: 1,
|
||||
});
|
||||
|
||||
// gpt-5.6-sol costs: prompt=400, completion=2000, cached=40.
|
||||
const sol = OPEN_AI_MODELS.find((m) => m.id === 'gpt-5.6-sol')!;
|
||||
expect(recordSpy).toHaveBeenCalledTimes(1);
|
||||
const [, , prefix, overrides] = recordSpy.mock.calls[0]!;
|
||||
expect(prefix).toBe('openai:gpt-5.6-sol');
|
||||
expect(overrides).toEqual({
|
||||
prompt_tokens: 3 * Number(sol.costs.prompt_tokens),
|
||||
completion_tokens: 2 * Number(sol.costs.completion_tokens),
|
||||
cached_tokens: 1 * Number(sol.costs.cached_tokens ?? 0),
|
||||
prompt_tokens: 3 * 500,
|
||||
completion_tokens: 2 * 3000,
|
||||
cached_tokens: 1 * 50,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -183,11 +183,11 @@ export const OPEN_AI_MODELS: IChatModel[] = [
|
||||
serviceSpeedRates: { fast: 2 },
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
prompt_tokens: 400,
|
||||
cached_tokens: 40,
|
||||
cache_write_tokens: 400 * 1.25,
|
||||
cache_write_12h_tokens: 400 * 2.5,
|
||||
completion_tokens: 2000,
|
||||
prompt_tokens: 500,
|
||||
cached_tokens: 50,
|
||||
cache_write_tokens: 500 * 1.25,
|
||||
cache_write_12h_tokens: 500 * 2.5,
|
||||
completion_tokens: 3000,
|
||||
},
|
||||
long_context_pricing: GPT_LONG_CONTEXT_PRICING,
|
||||
context: 1_050_000,
|
||||
|
||||
@@ -385,6 +385,8 @@ The `usageDetails.serviceSpeed` field reports the served speed. Billing uses the
|
||||
|
||||
### OpenAI models
|
||||
|
||||
GPT-5.6 Sol uses regular prices of $5 per million input tokens and $30 per million output tokens.
|
||||
|
||||
Passing `service_tier: "priority"` selects fast service, and `service_tier: "ultrafast"` selects ultrafast service. These requests use the same prices and supported-speed selection as `serviceSpeed`. An explicit `serviceSpeed` takes precedence.
|
||||
|
||||
Input and reasoning tokens reported by a non-streaming Responses API call are billed even when its output is empty. These charges apply whether the request fails or retries another provider.
|
||||
|
||||
Reference in new issue
Block a user