mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-26 07:57:10 +00:00
Add opus 4.8 (#3182)
* Add opus 4.8 * update alias * handling opus 48 omit temperature
This commit is contained in:
@@ -229,10 +229,13 @@ export class ClaudeProvider implements IChatProvider {
|
||||
reasoningEffort: requestedReasoningEffort,
|
||||
maxTokens: max_tokens,
|
||||
});
|
||||
// Opus 4.7 errors on non-default sampling params; omit temperature entirely.
|
||||
// Opus 4.7 and 4.8 error on non-default sampling params; omit temperature entirely.
|
||||
// Other models require temperature=1 when thinking is enabled.
|
||||
const isOpus47 = modelUsed.id === 'claude-opus-4-7';
|
||||
const resolvedTemperature = isOpus47
|
||||
const omitsTemperature = [
|
||||
'claude-opus-4-7',
|
||||
'claude-opus-4-8',
|
||||
].includes(modelUsed.id);
|
||||
const resolvedTemperature = omitsTemperature
|
||||
? undefined
|
||||
: thinkingConfig
|
||||
? 1
|
||||
|
||||
@@ -21,6 +21,37 @@ import type { IChatModel } from '../../types.js';
|
||||
|
||||
// Hardcoded from https://models.dev/api.json
|
||||
export const CLAUDE_MODELS: IChatModel[] = [
|
||||
{
|
||||
puterId: 'anthropic:anthropic/claude-opus-4-8',
|
||||
id: 'claude-opus-4-8',
|
||||
modalities: { input: ['text', 'image', 'pdf'], output: ['text'] },
|
||||
open_weights: false,
|
||||
tool_call: true,
|
||||
knowledge: '2026-01',
|
||||
release_date: '2026-05-28',
|
||||
aliases: [
|
||||
'claude-opus',
|
||||
'claude-opus-latest',
|
||||
'claude-opus-4-8-latest',
|
||||
'claude-opus-4.8',
|
||||
'claude-opus-4-8',
|
||||
'anthropic/claude-opus-4-8',
|
||||
],
|
||||
name: 'Claude Opus 4.8',
|
||||
costs_currency: 'usd-cents',
|
||||
input_cost_key: 'input_tokens',
|
||||
output_cost_key: 'output_tokens',
|
||||
costs: {
|
||||
tokens: 1_000_000,
|
||||
input_tokens: 500,
|
||||
ephemeral_5m_input_tokens: 500 * 1.25,
|
||||
ephemeral_1h_input_tokens: 500 * 2,
|
||||
cache_read_input_tokens: 500 * 0.1,
|
||||
output_tokens: 2500,
|
||||
},
|
||||
context: 1000000,
|
||||
max_tokens: 128000,
|
||||
},
|
||||
{
|
||||
puterId: 'anthropic:anthropic/claude-opus-4-7',
|
||||
id: 'claude-opus-4-7',
|
||||
@@ -30,8 +61,6 @@ export const CLAUDE_MODELS: IChatModel[] = [
|
||||
knowledge: '2026-01',
|
||||
release_date: '2026-04-16',
|
||||
aliases: [
|
||||
'claude-opus',
|
||||
'claude-opus-latest',
|
||||
'claude-opus-4-7-latest',
|
||||
'claude-opus-4.7',
|
||||
'claude-opus-4-7',
|
||||
|
||||
Reference in New Issue
Block a user