refactor: move anthropic/llm.js over to packages/api and update imports

This commit is contained in:
Dustin Healy 2025-08-30 21:42:53 -07:00 committed by Danny Avila
parent a50a098a6c
commit 796cb2b1ab
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
4 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,6 @@
const { getLLMConfig } = require('@librechat/api');
const { EModelEndpoint } = require('librechat-data-provider');
const { getUserKey, checkUserKeyExpiry } = require('~/server/services/UserService');
const { getLLMConfig } = require('~/server/services/Endpoints/anthropic/llm');
const AnthropicClient = require('~/app/clients/AnthropicClient');
const initializeClient = async ({ req, res, endpointOption, overrideModel, optionsOnly }) => {

View file

@ -1,4 +1,4 @@
const { getLLMConfig } = require('~/server/services/Endpoints/anthropic/llm');
const { getLLMConfig } = require('@librechat/api');
jest.mock('https-proxy-agent', () => ({
HttpsProxyAgent: jest.fn().mockImplementation((proxy) => ({ proxy })),

View file

@ -1 +1,2 @@
export * from './helpers';
export * from './llm';

View file

@ -1,6 +1,6 @@
const { ProxyAgent } = require('undici');
const { anthropicSettings, removeNullishValues } = require('librechat-data-provider');
const { checkPromptCacheSupport, getClaudeHeaders, configureReasoning } = require('@librechat/api');
const { checkPromptCacheSupport, getClaudeHeaders, configureReasoning } = require('./helpers');
/**
* Generates configuration options for creating an Anthropic language model (LLM) instance.
@ -100,4 +100,4 @@ function getLLMConfig(apiKey, options = {}) {
};
}
module.exports = { getLLMConfig };
export { getLLMConfig };