Upload api.js
Browse files- scripts/api.js +2 -2
scripts/api.js
CHANGED
|
@@ -11,7 +11,7 @@ const API = {
|
|
| 11 |
// Call Elysia via OpenRouter
|
| 12 |
async call(messages, options = {}) {
|
| 13 |
const apiKey = options.apiKey || Utils.storage.get("apiKey");
|
| 14 |
-
const model = options.model || Utils.storage.get("model", "
|
| 15 |
|
| 16 |
// Validate API key
|
| 17 |
const validation = Utils.validateApiKey(apiKey);
|
|
@@ -87,7 +87,7 @@ const API = {
|
|
| 87 |
// Stream Chat (for real-time responses)
|
| 88 |
async stream(messages, onChunk, options = {}) {
|
| 89 |
const apiKey = options.apiKey || Utils.storage.get("apiKey");
|
| 90 |
-
const model = options.model || Utils.storage.get("model", "
|
| 91 |
|
| 92 |
const validation = Utils.validateApiKey(apiKey);
|
| 93 |
if (!validation.valid) {
|
|
|
|
| 11 |
// Call Elysia via OpenRouter
|
| 12 |
async call(messages, options = {}) {
|
| 13 |
const apiKey = options.apiKey || Utils.storage.get("apiKey");
|
| 14 |
+
const model = options.model || Utils.storage.get("model", "anthropic/claude-haiku-4.5");
|
| 15 |
|
| 16 |
// Validate API key
|
| 17 |
const validation = Utils.validateApiKey(apiKey);
|
|
|
|
| 87 |
// Stream Chat (for real-time responses)
|
| 88 |
async stream(messages, onChunk, options = {}) {
|
| 89 |
const apiKey = options.apiKey || Utils.storage.get("apiKey");
|
| 90 |
+
const model = options.model || Utils.storage.get("model", "anthropic/claude-haiku-4.5");
|
| 91 |
|
| 92 |
const validation = Utils.validateApiKey(apiKey);
|
| 93 |
if (!validation.valid) {
|