Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/sim/providers/fireworks/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ describe('fireworksProvider', () => {

it('sends the resolved wire model name while reporting the catalog id', async () => {
mockCreate.mockResolvedValueOnce(textResponse('ok'))
mockResolveFireworksWireModel.mockReturnValueOnce('accounts/fireworks/models/glm-5p2')
mockResolveFireworksWireModel.mockReturnValueOnce('accounts/fireworks/models/glm-5p3')

const result = await fireworksProvider.executeRequest({
...baseRequest,
model: 'fireworks/glm-5.2',
})

expect(mockResolveFireworksWireModel).toHaveBeenCalledWith('glm-5.2')
expect(callBody(0).model).toBe('accounts/fireworks/models/glm-5p2')
expect(callBody(0).model).toBe('accounts/fireworks/models/glm-5p3')
// The catalog id is the billing/logging identity: the central cost policy,
// the usage ledger row, and the trace span all key on it.
expect(result).toMatchObject({ model: 'fireworks/glm-5.2' })
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/providers/fireworks/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { resolveFireworksWireModel } from '@/providers/fireworks/utils'

describe('resolveFireworksWireModel', () => {
it('maps the static hosted catalog ids to their serverless resource paths', () => {
expect(resolveFireworksWireModel('glm-5.2')).toBe('accounts/fireworks/models/glm-5p2')
expect(resolveFireworksWireModel('glm-5.2')).toBe('accounts/fireworks/models/glm-5p3')
expect(resolveFireworksWireModel('kimi-k3')).toBe('accounts/fireworks/models/kimi-k3')
})

Expand Down
2 changes: 1 addition & 1 deletion apps/sim/providers/fireworks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
const FIREWORKS_WIRE_NAMES: Record<string, string> = {
'glm-5.3': 'accounts/fireworks/models/glm-5p3',
'glm-5.2': 'accounts/fireworks/models/glm-5p2',
'glm-5.2': 'accounts/fireworks/models/glm-5p3',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Recorded costs use old prices

glm-5.2 now runs the same model as glm-5.3, but keeps the old cached-input price. models.ts lists cachedInput: 0.14 for fireworks/glm-5.2 and 0.26 for fireworks/glm-5.3.

If Fireworks reports cached tokens, conversation records and traces still price them using request.model. Requests using fireworks/glm-5.2 therefore record a lower cost for the same served model. Keep the alias if desired, but update its price to match the replacement.

'kimi-k3': 'accounts/fireworks/models/kimi-k3',
}

Expand Down