mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-19 05:24:28 +00:00
fix(models): price Hermes lowercase glm-5.2 the same as GLM-5.2 (#545)
This commit is contained in:
parent
10d911d962
commit
4dcb7e6c3d
2 changed files with 13 additions and 0 deletions
|
|
@ -325,6 +325,10 @@ const BUILTIN_ALIASES: Record<string, string> = {
|
|||
// ZCode runs GLM-5.2 through z.ai's start-plan subscription; it isn't in
|
||||
// LiteLLM yet. Price as the nearest released sibling (GLM-5.1) until it is.
|
||||
'GLM-5.2': 'glm-5p1',
|
||||
// Hermes Agent stores the same model id lowercased (`glm-5.2`) in its
|
||||
// sessions table, so it misses the capitalized alias above and goes
|
||||
// unpriced. Map the lowercase spelling to the same sibling.
|
||||
'glm-5.2': 'glm-5p1',
|
||||
}
|
||||
|
||||
let userAliases: Record<string, string> = {}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,15 @@ describe('getModelCosts', () => {
|
|||
expect(costs).not.toBeNull()
|
||||
expect(costs!.inputCostPerToken).toBe(5e-6)
|
||||
})
|
||||
|
||||
it('prices lowercase glm-5.2 (Hermes spelling) the same as capitalized GLM-5.2', () => {
|
||||
const lower = getModelCosts('glm-5.2')
|
||||
const upper = getModelCosts('GLM-5.2')
|
||||
expect(lower).not.toBeNull()
|
||||
expect(upper).not.toBeNull()
|
||||
expect(lower!.inputCostPerToken).toBe(upper!.inputCostPerToken)
|
||||
expect(lower!.outputCostPerToken).toBe(upper!.outputCostPerToken)
|
||||
})
|
||||
})
|
||||
|
||||
describe('getShortModelName', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue