mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-06-25 08:56:10 +00:00
🧪 fix: Align Pricing Spec Dep Signatures with TxDeps
This commit is contained in:
parent
2c7f5c38af
commit
698649eda5
1 changed files with 4 additions and 2 deletions
|
|
@ -5,9 +5,11 @@ import type { EndpointTokenConfig } from '~/types';
|
|||
import { matchModelName, findMatchingPattern } from '~/utils';
|
||||
import { buildTokenConfigMap } from './pricing';
|
||||
|
||||
/** Adapters: TxDeps types are looser than the utils signatures (string endpoint, undefined miss) */
|
||||
const { getValueKey, getMultiplier, getCacheMultiplier } = createTxMethods(mongoose, {
|
||||
matchModelName,
|
||||
findMatchingPattern,
|
||||
matchModelName: (model, endpoint) => matchModelName(model, endpoint as EModelEndpoint),
|
||||
findMatchingPattern: (model, values) =>
|
||||
findMatchingPattern(model, values as Record<string, number>) ?? undefined,
|
||||
});
|
||||
|
||||
const deps = { getValueKey, getMultiplier, getCacheMultiplier };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue