fix: add API key/auth token support across all model clients

This commit is contained in:
William Valentin
2026-02-05 10:56:40 -08:00
parent 747a7f44a2
commit f891c7aee8
4 changed files with 52 additions and 7 deletions
+12 -2
View File
@@ -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) {