refactor: swap old ConversationCosts endpoint out for much simpler 'costs' endpoint

/costs just recieves an array of { model, endpoint }  and returns the related prompt and completion token rates, leaving the actual message processing to be done later on rather than on the backend.
This commit is contained in:
Dustin Healy 2025-09-13 12:19:26 -07:00
parent ba8c09b361
commit 0edfecf44a
2 changed files with 25 additions and 91 deletions

View file

@ -66,8 +66,7 @@ export const messages = (params: q.MessagesListParams) => {
export const messagesArtifacts = (messageId: string) => `${messagesRoot}/artifacts/${messageId}`;
export const conversationCosts = (conversationId: string) =>
`/api/messages/${conversationId}/costs`;
export const costs = () => `/api/messages/costs`;
const shareRoot = `${BASE_URL}/api/share`;
export const shareMessages = (shareId: string) => `${shareRoot}/${shareId}`;