fix: add API key/auth token support across all model clients
This commit is contained in:
+12
-2
@@ -30,6 +30,8 @@ function createModelRouter(config: Config): ModelRouter {
|
||||
|
||||
const defaultClient = new AnthropicClient({
|
||||
model: models.default.model,
|
||||
apiKey: models.default.api_key,
|
||||
authToken: models.default.auth_token,
|
||||
});
|
||||
|
||||
let fastClient;
|
||||
@@ -37,11 +39,19 @@ function createModelRouter(config: Config): ModelRouter {
|
||||
let localClient;
|
||||
|
||||
if (models.fast) {
|
||||
fastClient = new AnthropicClient({ model: models.fast.model });
|
||||
fastClient = new AnthropicClient({
|
||||
model: models.fast.model,
|
||||
apiKey: models.fast.api_key,
|
||||
authToken: models.fast.auth_token,
|
||||
});
|
||||
}
|
||||
|
||||
if (models.complex) {
|
||||
complexClient = new AnthropicClient({ model: models.complex.model });
|
||||
complexClient = new AnthropicClient({
|
||||
model: models.complex.model,
|
||||
apiKey: models.complex.api_key,
|
||||
authToken: models.complex.auth_token,
|
||||
});
|
||||
}
|
||||
|
||||
if (models.local) {
|
||||
|
||||
Reference in New Issue
Block a user