@keystrokehq/openrouter 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/create-chat-completion.cjs +81 -0
- package/dist/actions/create-chat-completion.cjs.map +1 -0
- package/dist/actions/create-chat-completion.d.cts +9 -0
- package/dist/actions/create-chat-completion.d.cts.map +1 -0
- package/dist/actions/create-chat-completion.d.mts +9 -0
- package/dist/actions/create-chat-completion.d.mts.map +1 -0
- package/dist/actions/create-chat-completion.mjs +80 -0
- package/dist/actions/create-chat-completion.mjs.map +1 -0
- package/dist/actions/create-coinbase-charge.cjs +33 -0
- package/dist/actions/create-coinbase-charge.cjs.map +1 -0
- package/dist/actions/create-coinbase-charge.d.cts +9 -0
- package/dist/actions/create-coinbase-charge.d.cts.map +1 -0
- package/dist/actions/create-coinbase-charge.d.mts +9 -0
- package/dist/actions/create-coinbase-charge.d.mts.map +1 -0
- package/dist/actions/create-coinbase-charge.mjs +32 -0
- package/dist/actions/create-coinbase-charge.mjs.map +1 -0
- package/dist/actions/create-message.cjs +91 -0
- package/dist/actions/create-message.cjs.map +1 -0
- package/dist/actions/create-message.d.cts +9 -0
- package/dist/actions/create-message.d.cts.map +1 -0
- package/dist/actions/create-message.d.mts +9 -0
- package/dist/actions/create-message.d.mts.map +1 -0
- package/dist/actions/create-message.mjs +90 -0
- package/dist/actions/create-message.mjs.map +1 -0
- package/dist/actions/get-credits.cjs +20 -0
- package/dist/actions/get-credits.cjs.map +1 -0
- package/dist/actions/get-credits.d.cts +9 -0
- package/dist/actions/get-credits.d.cts.map +1 -0
- package/dist/actions/get-credits.d.mts +9 -0
- package/dist/actions/get-credits.d.mts.map +1 -0
- package/dist/actions/get-credits.mjs +19 -0
- package/dist/actions/get-credits.mjs.map +1 -0
- package/dist/actions/get-current-key.cjs +44 -0
- package/dist/actions/get-current-key.cjs.map +1 -0
- package/dist/actions/get-current-key.d.cts +9 -0
- package/dist/actions/get-current-key.d.cts.map +1 -0
- package/dist/actions/get-current-key.d.mts +9 -0
- package/dist/actions/get-current-key.d.mts.map +1 -0
- package/dist/actions/get-current-key.mjs +43 -0
- package/dist/actions/get-current-key.mjs.map +1 -0
- package/dist/actions/get-generation.cjs +45 -0
- package/dist/actions/get-generation.cjs.map +1 -0
- package/dist/actions/get-generation.d.cts +9 -0
- package/dist/actions/get-generation.d.cts.map +1 -0
- package/dist/actions/get-generation.d.mts +9 -0
- package/dist/actions/get-generation.d.mts.map +1 -0
- package/dist/actions/get-generation.mjs +44 -0
- package/dist/actions/get-generation.mjs.map +1 -0
- package/dist/actions/get-models-count.cjs +20 -0
- package/dist/actions/get-models-count.cjs.map +1 -0
- package/dist/actions/get-models-count.d.cts +9 -0
- package/dist/actions/get-models-count.d.cts.map +1 -0
- package/dist/actions/get-models-count.d.mts +9 -0
- package/dist/actions/get-models-count.d.mts.map +1 -0
- package/dist/actions/get-models-count.mjs +19 -0
- package/dist/actions/get-models-count.mjs.map +1 -0
- package/dist/actions/index.cjs +27 -0
- package/dist/actions/index.d.cts +14 -0
- package/dist/actions/index.d.mts +14 -0
- package/dist/actions/index.mjs +14 -0
- package/dist/actions/list-available-models.cjs +81 -0
- package/dist/actions/list-available-models.cjs.map +1 -0
- package/dist/actions/list-available-models.d.cts +9 -0
- package/dist/actions/list-available-models.d.cts.map +1 -0
- package/dist/actions/list-available-models.d.mts +9 -0
- package/dist/actions/list-available-models.d.mts.map +1 -0
- package/dist/actions/list-available-models.mjs +80 -0
- package/dist/actions/list-available-models.mjs.map +1 -0
- package/dist/actions/list-embedding-models.cjs +53 -0
- package/dist/actions/list-embedding-models.cjs.map +1 -0
- package/dist/actions/list-embedding-models.d.cts +9 -0
- package/dist/actions/list-embedding-models.d.cts.map +1 -0
- package/dist/actions/list-embedding-models.d.mts +9 -0
- package/dist/actions/list-embedding-models.d.mts.map +1 -0
- package/dist/actions/list-embedding-models.mjs +52 -0
- package/dist/actions/list-embedding-models.mjs.map +1 -0
- package/dist/actions/list-model-endpoints.cjs +51 -0
- package/dist/actions/list-model-endpoints.cjs.map +1 -0
- package/dist/actions/list-model-endpoints.d.cts +9 -0
- package/dist/actions/list-model-endpoints.d.cts.map +1 -0
- package/dist/actions/list-model-endpoints.d.mts +9 -0
- package/dist/actions/list-model-endpoints.d.mts.map +1 -0
- package/dist/actions/list-model-endpoints.mjs +50 -0
- package/dist/actions/list-model-endpoints.mjs.map +1 -0
- package/dist/actions/list-providers.cjs +21 -0
- package/dist/actions/list-providers.cjs.map +1 -0
- package/dist/actions/list-providers.d.cts +9 -0
- package/dist/actions/list-providers.d.cts.map +1 -0
- package/dist/actions/list-providers.d.mts +9 -0
- package/dist/actions/list-providers.d.mts.map +1 -0
- package/dist/actions/list-providers.mjs +20 -0
- package/dist/actions/list-providers.mjs.map +1 -0
- package/dist/actions/list-user-models.cjs +57 -0
- package/dist/actions/list-user-models.cjs.map +1 -0
- package/dist/actions/list-user-models.d.cts +9 -0
- package/dist/actions/list-user-models.d.cts.map +1 -0
- package/dist/actions/list-user-models.d.mts +9 -0
- package/dist/actions/list-user-models.d.mts.map +1 -0
- package/dist/actions/list-user-models.mjs +56 -0
- package/dist/actions/list-user-models.mjs.map +1 -0
- package/dist/actions/list-zdr-endpoints.cjs +55 -0
- package/dist/actions/list-zdr-endpoints.cjs.map +1 -0
- package/dist/actions/list-zdr-endpoints.d.cts +9 -0
- package/dist/actions/list-zdr-endpoints.d.cts.map +1 -0
- package/dist/actions/list-zdr-endpoints.d.mts +9 -0
- package/dist/actions/list-zdr-endpoints.d.mts.map +1 -0
- package/dist/actions/list-zdr-endpoints.mjs +54 -0
- package/dist/actions/list-zdr-endpoints.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.mjs +17 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-models-count.mjs","names":[],"sources":["../../src/actions/get-models-count.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterGetModelsCountInput: z.ZodTypeAny = z.object({\n x_title: z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n http_referer: z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n}).describe(\"Request model for getting the total count of available models.\");\nconst OpenrouterGetModelsCount_ModelsCountDataSchema: z.ZodTypeAny = z.object({\n count: z.number().int().describe(\"Total number of available models\"),\n}).describe(\"Container for the model count.\");\nexport const OpenrouterGetModelsCountOutput: z.ZodTypeAny = z.object({\n data: OpenrouterGetModelsCount_ModelsCountDataSchema.nullable(),\n}).describe(\"Response model containing the total count of available models.\");\n\nexport const openrouterGetModelsCount = action(\"OPENROUTER_GET_MODELS_COUNT\", {\n slug: \"openrouter-get-models-count\",\n name: \"Get Models Count\",\n description: \"Tool to get the total count of available models on OpenRouter. Use when you need to know how many models are available without fetching the full list.\",\n input: OpenrouterGetModelsCountInput,\n output: OpenrouterGetModelsCountOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAA8C,EAAE,OAAO;CAClE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACtI,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACjM,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAM,iDAA+D,EAAE,OAAO,EAC5E,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC,EACrE,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAK5C,MAAa,2BAA2B,OAAO,+BAA+B;CAC5E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAT0D,EAAE,OAAO,EACnE,MAAM,+CAA+C,SAAS,EAChE,CAAC,CAAC,CAAC,SAAS,gEAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_create_chat_completion = require("./create-chat-completion.cjs");
|
|
3
|
+
const require_create_coinbase_charge = require("./create-coinbase-charge.cjs");
|
|
4
|
+
const require_create_message = require("./create-message.cjs");
|
|
5
|
+
const require_get_credits = require("./get-credits.cjs");
|
|
6
|
+
const require_get_current_key = require("./get-current-key.cjs");
|
|
7
|
+
const require_get_generation = require("./get-generation.cjs");
|
|
8
|
+
const require_get_models_count = require("./get-models-count.cjs");
|
|
9
|
+
const require_list_available_models = require("./list-available-models.cjs");
|
|
10
|
+
const require_list_embedding_models = require("./list-embedding-models.cjs");
|
|
11
|
+
const require_list_model_endpoints = require("./list-model-endpoints.cjs");
|
|
12
|
+
const require_list_providers = require("./list-providers.cjs");
|
|
13
|
+
const require_list_user_models = require("./list-user-models.cjs");
|
|
14
|
+
const require_list_zdr_endpoints = require("./list-zdr-endpoints.cjs");
|
|
15
|
+
exports.openrouterCreateChatCompletion = require_create_chat_completion.openrouterCreateChatCompletion;
|
|
16
|
+
exports.openrouterCreateCoinbaseCharge = require_create_coinbase_charge.openrouterCreateCoinbaseCharge;
|
|
17
|
+
exports.openrouterCreateMessage = require_create_message.openrouterCreateMessage;
|
|
18
|
+
exports.openrouterGetCredits = require_get_credits.openrouterGetCredits;
|
|
19
|
+
exports.openrouterGetCurrentKey = require_get_current_key.openrouterGetCurrentKey;
|
|
20
|
+
exports.openrouterGetGeneration = require_get_generation.openrouterGetGeneration;
|
|
21
|
+
exports.openrouterGetModelsCount = require_get_models_count.openrouterGetModelsCount;
|
|
22
|
+
exports.openrouterListAvailableModels = require_list_available_models.openrouterListAvailableModels;
|
|
23
|
+
exports.openrouterListEmbeddingModels = require_list_embedding_models.openrouterListEmbeddingModels;
|
|
24
|
+
exports.openrouterListModelEndpoints = require_list_model_endpoints.openrouterListModelEndpoints;
|
|
25
|
+
exports.openrouterListProviders = require_list_providers.openrouterListProviders;
|
|
26
|
+
exports.openrouterListUserModels = require_list_user_models.openrouterListUserModels;
|
|
27
|
+
exports.openrouterListZdrEndpoints = require_list_zdr_endpoints.openrouterListZdrEndpoints;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { openrouterCreateChatCompletion } from "./create-chat-completion.cjs";
|
|
2
|
+
import { openrouterCreateCoinbaseCharge } from "./create-coinbase-charge.cjs";
|
|
3
|
+
import { openrouterCreateMessage } from "./create-message.cjs";
|
|
4
|
+
import { openrouterGetCredits } from "./get-credits.cjs";
|
|
5
|
+
import { openrouterGetCurrentKey } from "./get-current-key.cjs";
|
|
6
|
+
import { openrouterGetGeneration } from "./get-generation.cjs";
|
|
7
|
+
import { openrouterGetModelsCount } from "./get-models-count.cjs";
|
|
8
|
+
import { openrouterListAvailableModels } from "./list-available-models.cjs";
|
|
9
|
+
import { openrouterListEmbeddingModels } from "./list-embedding-models.cjs";
|
|
10
|
+
import { openrouterListModelEndpoints } from "./list-model-endpoints.cjs";
|
|
11
|
+
import { openrouterListProviders } from "./list-providers.cjs";
|
|
12
|
+
import { openrouterListUserModels } from "./list-user-models.cjs";
|
|
13
|
+
import { openrouterListZdrEndpoints } from "./list-zdr-endpoints.cjs";
|
|
14
|
+
export { openrouterCreateChatCompletion, openrouterCreateCoinbaseCharge, openrouterCreateMessage, openrouterGetCredits, openrouterGetCurrentKey, openrouterGetGeneration, openrouterGetModelsCount, openrouterListAvailableModels, openrouterListEmbeddingModels, openrouterListModelEndpoints, openrouterListProviders, openrouterListUserModels, openrouterListZdrEndpoints };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { openrouterCreateChatCompletion } from "./create-chat-completion.mjs";
|
|
2
|
+
import { openrouterCreateCoinbaseCharge } from "./create-coinbase-charge.mjs";
|
|
3
|
+
import { openrouterCreateMessage } from "./create-message.mjs";
|
|
4
|
+
import { openrouterGetCredits } from "./get-credits.mjs";
|
|
5
|
+
import { openrouterGetCurrentKey } from "./get-current-key.mjs";
|
|
6
|
+
import { openrouterGetGeneration } from "./get-generation.mjs";
|
|
7
|
+
import { openrouterGetModelsCount } from "./get-models-count.mjs";
|
|
8
|
+
import { openrouterListAvailableModels } from "./list-available-models.mjs";
|
|
9
|
+
import { openrouterListEmbeddingModels } from "./list-embedding-models.mjs";
|
|
10
|
+
import { openrouterListModelEndpoints } from "./list-model-endpoints.mjs";
|
|
11
|
+
import { openrouterListProviders } from "./list-providers.mjs";
|
|
12
|
+
import { openrouterListUserModels } from "./list-user-models.mjs";
|
|
13
|
+
import { openrouterListZdrEndpoints } from "./list-zdr-endpoints.mjs";
|
|
14
|
+
export { openrouterCreateChatCompletion, openrouterCreateCoinbaseCharge, openrouterCreateMessage, openrouterGetCredits, openrouterGetCurrentKey, openrouterGetGeneration, openrouterGetModelsCount, openrouterListAvailableModels, openrouterListEmbeddingModels, openrouterListModelEndpoints, openrouterListProviders, openrouterListUserModels, openrouterListZdrEndpoints };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { openrouterCreateChatCompletion } from "./create-chat-completion.mjs";
|
|
2
|
+
import { openrouterCreateCoinbaseCharge } from "./create-coinbase-charge.mjs";
|
|
3
|
+
import { openrouterCreateMessage } from "./create-message.mjs";
|
|
4
|
+
import { openrouterGetCredits } from "./get-credits.mjs";
|
|
5
|
+
import { openrouterGetCurrentKey } from "./get-current-key.mjs";
|
|
6
|
+
import { openrouterGetGeneration } from "./get-generation.mjs";
|
|
7
|
+
import { openrouterGetModelsCount } from "./get-models-count.mjs";
|
|
8
|
+
import { openrouterListAvailableModels } from "./list-available-models.mjs";
|
|
9
|
+
import { openrouterListEmbeddingModels } from "./list-embedding-models.mjs";
|
|
10
|
+
import { openrouterListModelEndpoints } from "./list-model-endpoints.mjs";
|
|
11
|
+
import { openrouterListProviders } from "./list-providers.mjs";
|
|
12
|
+
import { openrouterListUserModels } from "./list-user-models.mjs";
|
|
13
|
+
import { openrouterListZdrEndpoints } from "./list-zdr-endpoints.mjs";
|
|
14
|
+
export { openrouterCreateChatCompletion, openrouterCreateCoinbaseCharge, openrouterCreateMessage, openrouterGetCredits, openrouterGetCurrentKey, openrouterGetGeneration, openrouterGetModelsCount, openrouterListAvailableModels, openrouterListEmbeddingModels, openrouterListModelEndpoints, openrouterListProviders, openrouterListUserModels, openrouterListZdrEndpoints };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/list-available-models.ts
|
|
4
|
+
const OpenrouterListAvailableModelsInput = zod.z.object({
|
|
5
|
+
use_rss: zod.z.boolean().default(false).describe("Return RSS XML feed instead of JSON (BETA).").optional(),
|
|
6
|
+
category: zod.z.enum([
|
|
7
|
+
"programming",
|
|
8
|
+
"roleplay",
|
|
9
|
+
"marketing",
|
|
10
|
+
"marketing/seo",
|
|
11
|
+
"technology",
|
|
12
|
+
"science",
|
|
13
|
+
"translation",
|
|
14
|
+
"legal",
|
|
15
|
+
"finance",
|
|
16
|
+
"health",
|
|
17
|
+
"trivia",
|
|
18
|
+
"academia"
|
|
19
|
+
]).describe("Valid categories for filtering models.").optional(),
|
|
20
|
+
use_rss_chat_links: zod.z.boolean().default(false).describe("Use chat URLs instead of model page URLs in RSS items (only applies when use_rss=true) (BETA).").optional()
|
|
21
|
+
});
|
|
22
|
+
const OpenrouterListAvailableModels_PricingSchema = zod.z.object({
|
|
23
|
+
audio: zod.z.string().describe("Price per audio unit.").nullable().optional(),
|
|
24
|
+
image: zod.z.string().describe("Price per image.").nullable().optional(),
|
|
25
|
+
prompt: zod.z.string().describe("Price per prompt token."),
|
|
26
|
+
request: zod.z.string().describe("Price per request.").nullable().optional(),
|
|
27
|
+
completion: zod.z.string().describe("Price per completion token."),
|
|
28
|
+
web_search: zod.z.string().describe("Price per web search.").nullable().optional(),
|
|
29
|
+
input_cache_read: zod.z.string().describe("Price per input cache read.").nullable().optional(),
|
|
30
|
+
input_cache_write: zod.z.string().describe("Price per input cache write.").nullable().optional(),
|
|
31
|
+
internal_reasoning: zod.z.string().describe("Price per internal reasoning.").nullable().optional()
|
|
32
|
+
});
|
|
33
|
+
const OpenrouterListAvailableModels_ArchitectureSchema = zod.z.object({
|
|
34
|
+
modality: zod.z.string().describe("Combined modality string (e.g., 'text+image->text').").nullable().optional(),
|
|
35
|
+
tokenizer: zod.z.string().describe("Tokenization method used."),
|
|
36
|
+
instruct_type: zod.z.string().describe("Instruction tuning type for the model.").nullable().optional(),
|
|
37
|
+
input_modalities: zod.z.array(zod.z.string()).describe("Supported input types (e.g., 'text', 'image')."),
|
|
38
|
+
output_modalities: zod.z.array(zod.z.string()).describe("Supported output types (e.g., 'text').")
|
|
39
|
+
});
|
|
40
|
+
const OpenrouterListAvailableModels_TopProviderSchema = zod.z.object({
|
|
41
|
+
is_moderated: zod.z.boolean().describe("Indicates if the content is moderated."),
|
|
42
|
+
context_length: zod.z.number().int().describe("Context window size provided by this provider.").nullable().optional(),
|
|
43
|
+
max_completion_tokens: zod.z.number().int().describe("Maximum tokens that can be generated in the completion.").nullable().optional()
|
|
44
|
+
});
|
|
45
|
+
const OpenrouterListAvailableModels_DefaultParametersSchema = zod.z.object({
|
|
46
|
+
top_p: zod.z.number().describe("Default top_p setting.").nullable().optional(),
|
|
47
|
+
temperature: zod.z.number().describe("Default temperature setting.").nullable().optional(),
|
|
48
|
+
frequency_penalty: zod.z.number().describe("Default frequency penalty setting.").nullable().optional()
|
|
49
|
+
}).describe("Default parameter values for the model.");
|
|
50
|
+
const OpenrouterListAvailableModels_PerRequestLimitsSchema = zod.z.object({
|
|
51
|
+
prompt_tokens: zod.z.number().describe("Maximum prompt tokens allowed per request."),
|
|
52
|
+
completion_tokens: zod.z.number().describe("Maximum completion tokens allowed per request.")
|
|
53
|
+
}).describe("Rate limiting information for the model.");
|
|
54
|
+
const OpenrouterListAvailableModels_ModelInfoSchema = zod.z.object({
|
|
55
|
+
id: zod.z.string().describe("Unique model identifier."),
|
|
56
|
+
name: zod.z.string().describe("Human-readable display name for the model."),
|
|
57
|
+
created: zod.z.number().describe("Unix timestamp when the model was added."),
|
|
58
|
+
pricing: OpenrouterListAvailableModels_PricingSchema.nullable(),
|
|
59
|
+
description: zod.z.string().describe("Detailed description of the model's capabilities."),
|
|
60
|
+
architecture: OpenrouterListAvailableModels_ArchitectureSchema.nullable(),
|
|
61
|
+
top_provider: OpenrouterListAvailableModels_TopProviderSchema.nullable(),
|
|
62
|
+
canonical_slug: zod.z.string().describe("Permanent slug for the model (immutable)."),
|
|
63
|
+
context_length: zod.z.number().int().describe("Maximum context window size in tokens."),
|
|
64
|
+
expiration_date: zod.z.string().describe("ISO 8601 date when the model will be deprecated.").nullable().optional(),
|
|
65
|
+
hugging_face_id: zod.z.string().describe("Identifier for the model on Hugging Face.").nullable().optional(),
|
|
66
|
+
default_parameters: OpenrouterListAvailableModels_DefaultParametersSchema.nullable(),
|
|
67
|
+
per_request_limits: OpenrouterListAvailableModels_PerRequestLimitsSchema.nullable().optional(),
|
|
68
|
+
supported_parameters: zod.z.array(zod.z.string()).describe("Supported API parameters for this model.")
|
|
69
|
+
});
|
|
70
|
+
const OpenrouterListAvailableModelsOutput = zod.z.object({ data: zod.z.array(OpenrouterListAvailableModels_ModelInfoSchema).describe("List of available models.") });
|
|
71
|
+
const openrouterListAvailableModels = require_action.action("OPENROUTER_LIST_AVAILABLE_MODELS", {
|
|
72
|
+
slug: "openrouter-list-available-models",
|
|
73
|
+
name: "List Available Models",
|
|
74
|
+
description: "Tool to list available models via OpenRouter API. Use after confirming authentication to fetch the model catalog. Use exact model IDs returned here in OPENROUTER_CREATE_CHAT_COMPLETION or OPENROUTER_CREATE_COMPLETION calls — hard-coded IDs may break when the catalog changes. Use exact author and slug values from this response as inputs to OPENROUTER_LIST_MODEL_ENDPOINTS. Models have varying capabilities (e.g., tools, reasoning); verify individual model capabilities before downstream use. Pricing and latency metadata may be null or approximate — handle missing values in routing logic.",
|
|
75
|
+
input: OpenrouterListAvailableModelsInput,
|
|
76
|
+
output: OpenrouterListAvailableModelsOutput
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
exports.openrouterListAvailableModels = openrouterListAvailableModels;
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=list-available-models.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-available-models.cjs","names":["z","action"],"sources":["../../src/actions/list-available-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterListAvailableModelsInput: z.ZodTypeAny = z.object({\n use_rss: z.boolean().default(false).describe(\"Return RSS XML feed instead of JSON (BETA).\").optional(),\n category: z.enum([\"programming\", \"roleplay\", \"marketing\", \"marketing/seo\", \"technology\", \"science\", \"translation\", \"legal\", \"finance\", \"health\", \"trivia\", \"academia\"]).describe(\"Valid categories for filtering models.\").optional(),\n use_rss_chat_links: z.boolean().default(false).describe(\"Use chat URLs instead of model page URLs in RSS items (only applies when use_rss=true) (BETA).\").optional(),\n});\nconst OpenrouterListAvailableModels_PricingSchema: z.ZodTypeAny = z.object({\n audio: z.string().describe(\"Price per audio unit.\").nullable().optional(),\n image: z.string().describe(\"Price per image.\").nullable().optional(),\n prompt: z.string().describe(\"Price per prompt token.\"),\n request: z.string().describe(\"Price per request.\").nullable().optional(),\n completion: z.string().describe(\"Price per completion token.\"),\n web_search: z.string().describe(\"Price per web search.\").nullable().optional(),\n input_cache_read: z.string().describe(\"Price per input cache read.\").nullable().optional(),\n input_cache_write: z.string().describe(\"Price per input cache write.\").nullable().optional(),\n internal_reasoning: z.string().describe(\"Price per internal reasoning.\").nullable().optional(),\n});\nconst OpenrouterListAvailableModels_ArchitectureSchema: z.ZodTypeAny = z.object({\n modality: z.string().describe(\"Combined modality string (e.g., 'text+image->text').\").nullable().optional(),\n tokenizer: z.string().describe(\"Tokenization method used.\"),\n instruct_type: z.string().describe(\"Instruction tuning type for the model.\").nullable().optional(),\n input_modalities: z.array(z.string()).describe(\"Supported input types (e.g., 'text', 'image').\"),\n output_modalities: z.array(z.string()).describe(\"Supported output types (e.g., 'text').\"),\n});\nconst OpenrouterListAvailableModels_TopProviderSchema: z.ZodTypeAny = z.object({\n is_moderated: z.boolean().describe(\"Indicates if the content is moderated.\"),\n context_length: z.number().int().describe(\"Context window size provided by this provider.\").nullable().optional(),\n max_completion_tokens: z.number().int().describe(\"Maximum tokens that can be generated in the completion.\").nullable().optional(),\n});\nconst OpenrouterListAvailableModels_DefaultParametersSchema: z.ZodTypeAny = z.object({\n top_p: z.number().describe(\"Default top_p setting.\").nullable().optional(),\n temperature: z.number().describe(\"Default temperature setting.\").nullable().optional(),\n frequency_penalty: z.number().describe(\"Default frequency penalty setting.\").nullable().optional(),\n}).describe(\"Default parameter values for the model.\");\nconst OpenrouterListAvailableModels_PerRequestLimitsSchema: z.ZodTypeAny = z.object({\n prompt_tokens: z.number().describe(\"Maximum prompt tokens allowed per request.\"),\n completion_tokens: z.number().describe(\"Maximum completion tokens allowed per request.\"),\n}).describe(\"Rate limiting information for the model.\");\nconst OpenrouterListAvailableModels_ModelInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique model identifier.\"),\n name: z.string().describe(\"Human-readable display name for the model.\"),\n created: z.number().describe(\"Unix timestamp when the model was added.\"),\n pricing: OpenrouterListAvailableModels_PricingSchema.nullable(),\n description: z.string().describe(\"Detailed description of the model's capabilities.\"),\n architecture: OpenrouterListAvailableModels_ArchitectureSchema.nullable(),\n top_provider: OpenrouterListAvailableModels_TopProviderSchema.nullable(),\n canonical_slug: z.string().describe(\"Permanent slug for the model (immutable).\"),\n context_length: z.number().int().describe(\"Maximum context window size in tokens.\"),\n expiration_date: z.string().describe(\"ISO 8601 date when the model will be deprecated.\").nullable().optional(),\n hugging_face_id: z.string().describe(\"Identifier for the model on Hugging Face.\").nullable().optional(),\n default_parameters: OpenrouterListAvailableModels_DefaultParametersSchema.nullable(),\n per_request_limits: OpenrouterListAvailableModels_PerRequestLimitsSchema.nullable().optional(),\n supported_parameters: z.array(z.string()).describe(\"Supported API parameters for this model.\"),\n});\nexport const OpenrouterListAvailableModelsOutput: z.ZodTypeAny = z.object({\n data: z.array(OpenrouterListAvailableModels_ModelInfoSchema).describe(\"List of available models.\"),\n});\n\nexport const openrouterListAvailableModels = action(\"OPENROUTER_LIST_AVAILABLE_MODELS\", {\n slug: \"openrouter-list-available-models\",\n name: \"List Available Models\",\n description: \"Tool to list available models via OpenRouter API. Use after confirming authentication to fetch the model catalog. Use exact model IDs returned here in OPENROUTER_CREATE_CHAT_COMPLETION or OPENROUTER_CREATE_COMPLETION calls — hard-coded IDs may break when the catalog changes. Use exact author and slug values from this response as inputs to OPENROUTER_LIST_MODEL_ENDPOINTS. Models have varying capabilities (e.g., tools, reasoning); verify individual model capabilities before downstream use. Pricing and latency metadata may be null or approximate — handle missing values in routing logic.\",\n input: OpenrouterListAvailableModelsInput,\n output: OpenrouterListAvailableModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,SAASA,IAAAA,EAAE,QAA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}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/list-available-models.d.ts
|
|
4
|
+
declare const OpenrouterListAvailableModelsInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterListAvailableModelsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterListAvailableModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterListAvailableModels };
|
|
9
|
+
//# sourceMappingURL=list-available-models.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-available-models.d.cts","names":[],"sources":["../../src/actions/list-available-models.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAIjD;AAAA,cAiDW,mCAAA,EAAqC,CAAA,CAAE,UAElD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/list-available-models.d.ts
|
|
4
|
+
declare const OpenrouterListAvailableModelsInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterListAvailableModelsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterListAvailableModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterListAvailableModels };
|
|
9
|
+
//# sourceMappingURL=list-available-models.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-available-models.d.mts","names":[],"sources":["../../src/actions/list-available-models.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAIjD;AAAA,cAiDW,mCAAA,EAAqC,CAAA,CAAE,UAElD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/list-available-models.ts
|
|
4
|
+
const OpenrouterListAvailableModelsInput = z.object({
|
|
5
|
+
use_rss: z.boolean().default(false).describe("Return RSS XML feed instead of JSON (BETA).").optional(),
|
|
6
|
+
category: z.enum([
|
|
7
|
+
"programming",
|
|
8
|
+
"roleplay",
|
|
9
|
+
"marketing",
|
|
10
|
+
"marketing/seo",
|
|
11
|
+
"technology",
|
|
12
|
+
"science",
|
|
13
|
+
"translation",
|
|
14
|
+
"legal",
|
|
15
|
+
"finance",
|
|
16
|
+
"health",
|
|
17
|
+
"trivia",
|
|
18
|
+
"academia"
|
|
19
|
+
]).describe("Valid categories for filtering models.").optional(),
|
|
20
|
+
use_rss_chat_links: z.boolean().default(false).describe("Use chat URLs instead of model page URLs in RSS items (only applies when use_rss=true) (BETA).").optional()
|
|
21
|
+
});
|
|
22
|
+
const OpenrouterListAvailableModels_PricingSchema = z.object({
|
|
23
|
+
audio: z.string().describe("Price per audio unit.").nullable().optional(),
|
|
24
|
+
image: z.string().describe("Price per image.").nullable().optional(),
|
|
25
|
+
prompt: z.string().describe("Price per prompt token."),
|
|
26
|
+
request: z.string().describe("Price per request.").nullable().optional(),
|
|
27
|
+
completion: z.string().describe("Price per completion token."),
|
|
28
|
+
web_search: z.string().describe("Price per web search.").nullable().optional(),
|
|
29
|
+
input_cache_read: z.string().describe("Price per input cache read.").nullable().optional(),
|
|
30
|
+
input_cache_write: z.string().describe("Price per input cache write.").nullable().optional(),
|
|
31
|
+
internal_reasoning: z.string().describe("Price per internal reasoning.").nullable().optional()
|
|
32
|
+
});
|
|
33
|
+
const OpenrouterListAvailableModels_ArchitectureSchema = z.object({
|
|
34
|
+
modality: z.string().describe("Combined modality string (e.g., 'text+image->text').").nullable().optional(),
|
|
35
|
+
tokenizer: z.string().describe("Tokenization method used."),
|
|
36
|
+
instruct_type: z.string().describe("Instruction tuning type for the model.").nullable().optional(),
|
|
37
|
+
input_modalities: z.array(z.string()).describe("Supported input types (e.g., 'text', 'image')."),
|
|
38
|
+
output_modalities: z.array(z.string()).describe("Supported output types (e.g., 'text').")
|
|
39
|
+
});
|
|
40
|
+
const OpenrouterListAvailableModels_TopProviderSchema = z.object({
|
|
41
|
+
is_moderated: z.boolean().describe("Indicates if the content is moderated."),
|
|
42
|
+
context_length: z.number().int().describe("Context window size provided by this provider.").nullable().optional(),
|
|
43
|
+
max_completion_tokens: z.number().int().describe("Maximum tokens that can be generated in the completion.").nullable().optional()
|
|
44
|
+
});
|
|
45
|
+
const OpenrouterListAvailableModels_DefaultParametersSchema = z.object({
|
|
46
|
+
top_p: z.number().describe("Default top_p setting.").nullable().optional(),
|
|
47
|
+
temperature: z.number().describe("Default temperature setting.").nullable().optional(),
|
|
48
|
+
frequency_penalty: z.number().describe("Default frequency penalty setting.").nullable().optional()
|
|
49
|
+
}).describe("Default parameter values for the model.");
|
|
50
|
+
const OpenrouterListAvailableModels_PerRequestLimitsSchema = z.object({
|
|
51
|
+
prompt_tokens: z.number().describe("Maximum prompt tokens allowed per request."),
|
|
52
|
+
completion_tokens: z.number().describe("Maximum completion tokens allowed per request.")
|
|
53
|
+
}).describe("Rate limiting information for the model.");
|
|
54
|
+
const OpenrouterListAvailableModels_ModelInfoSchema = z.object({
|
|
55
|
+
id: z.string().describe("Unique model identifier."),
|
|
56
|
+
name: z.string().describe("Human-readable display name for the model."),
|
|
57
|
+
created: z.number().describe("Unix timestamp when the model was added."),
|
|
58
|
+
pricing: OpenrouterListAvailableModels_PricingSchema.nullable(),
|
|
59
|
+
description: z.string().describe("Detailed description of the model's capabilities."),
|
|
60
|
+
architecture: OpenrouterListAvailableModels_ArchitectureSchema.nullable(),
|
|
61
|
+
top_provider: OpenrouterListAvailableModels_TopProviderSchema.nullable(),
|
|
62
|
+
canonical_slug: z.string().describe("Permanent slug for the model (immutable)."),
|
|
63
|
+
context_length: z.number().int().describe("Maximum context window size in tokens."),
|
|
64
|
+
expiration_date: z.string().describe("ISO 8601 date when the model will be deprecated.").nullable().optional(),
|
|
65
|
+
hugging_face_id: z.string().describe("Identifier for the model on Hugging Face.").nullable().optional(),
|
|
66
|
+
default_parameters: OpenrouterListAvailableModels_DefaultParametersSchema.nullable(),
|
|
67
|
+
per_request_limits: OpenrouterListAvailableModels_PerRequestLimitsSchema.nullable().optional(),
|
|
68
|
+
supported_parameters: z.array(z.string()).describe("Supported API parameters for this model.")
|
|
69
|
+
});
|
|
70
|
+
const openrouterListAvailableModels = action("OPENROUTER_LIST_AVAILABLE_MODELS", {
|
|
71
|
+
slug: "openrouter-list-available-models",
|
|
72
|
+
name: "List Available Models",
|
|
73
|
+
description: "Tool to list available models via OpenRouter API. Use after confirming authentication to fetch the model catalog. Use exact model IDs returned here in OPENROUTER_CREATE_CHAT_COMPLETION or OPENROUTER_CREATE_COMPLETION calls — hard-coded IDs may break when the catalog changes. Use exact author and slug values from this response as inputs to OPENROUTER_LIST_MODEL_ENDPOINTS. Models have varying capabilities (e.g., tools, reasoning); verify individual model capabilities before downstream use. Pricing and latency metadata may be null or approximate — handle missing values in routing logic.",
|
|
74
|
+
input: OpenrouterListAvailableModelsInput,
|
|
75
|
+
output: z.object({ data: z.array(OpenrouterListAvailableModels_ModelInfoSchema).describe("List of available models.") })
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { openrouterListAvailableModels };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=list-available-models.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-available-models.mjs","names":[],"sources":["../../src/actions/list-available-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterListAvailableModelsInput: z.ZodTypeAny = z.object({\n use_rss: z.boolean().default(false).describe(\"Return RSS XML feed instead of JSON (BETA).\").optional(),\n category: z.enum([\"programming\", \"roleplay\", \"marketing\", \"marketing/seo\", \"technology\", \"science\", \"translation\", \"legal\", \"finance\", \"health\", \"trivia\", \"academia\"]).describe(\"Valid categories for filtering models.\").optional(),\n use_rss_chat_links: z.boolean().default(false).describe(\"Use chat URLs instead of model page URLs in RSS items (only applies when use_rss=true) (BETA).\").optional(),\n});\nconst OpenrouterListAvailableModels_PricingSchema: z.ZodTypeAny = z.object({\n audio: z.string().describe(\"Price per audio unit.\").nullable().optional(),\n image: z.string().describe(\"Price per image.\").nullable().optional(),\n prompt: z.string().describe(\"Price per prompt token.\"),\n request: z.string().describe(\"Price per request.\").nullable().optional(),\n completion: z.string().describe(\"Price per completion token.\"),\n web_search: z.string().describe(\"Price per web search.\").nullable().optional(),\n input_cache_read: z.string().describe(\"Price per input cache read.\").nullable().optional(),\n input_cache_write: z.string().describe(\"Price per input cache write.\").nullable().optional(),\n internal_reasoning: z.string().describe(\"Price per internal reasoning.\").nullable().optional(),\n});\nconst OpenrouterListAvailableModels_ArchitectureSchema: z.ZodTypeAny = z.object({\n modality: z.string().describe(\"Combined modality string (e.g., 'text+image->text').\").nullable().optional(),\n tokenizer: z.string().describe(\"Tokenization method used.\"),\n instruct_type: z.string().describe(\"Instruction tuning type for the model.\").nullable().optional(),\n input_modalities: z.array(z.string()).describe(\"Supported input types (e.g., 'text', 'image').\"),\n output_modalities: z.array(z.string()).describe(\"Supported output types (e.g., 'text').\"),\n});\nconst OpenrouterListAvailableModels_TopProviderSchema: z.ZodTypeAny = z.object({\n is_moderated: z.boolean().describe(\"Indicates if the content is moderated.\"),\n context_length: z.number().int().describe(\"Context window size provided by this provider.\").nullable().optional(),\n max_completion_tokens: z.number().int().describe(\"Maximum tokens that can be generated in the completion.\").nullable().optional(),\n});\nconst OpenrouterListAvailableModels_DefaultParametersSchema: z.ZodTypeAny = z.object({\n top_p: z.number().describe(\"Default top_p setting.\").nullable().optional(),\n temperature: z.number().describe(\"Default temperature setting.\").nullable().optional(),\n frequency_penalty: z.number().describe(\"Default frequency penalty setting.\").nullable().optional(),\n}).describe(\"Default parameter values for the model.\");\nconst OpenrouterListAvailableModels_PerRequestLimitsSchema: z.ZodTypeAny = z.object({\n prompt_tokens: z.number().describe(\"Maximum prompt tokens allowed per request.\"),\n completion_tokens: z.number().describe(\"Maximum completion tokens allowed per request.\"),\n}).describe(\"Rate limiting information for the model.\");\nconst OpenrouterListAvailableModels_ModelInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique model identifier.\"),\n name: z.string().describe(\"Human-readable display name for the model.\"),\n created: z.number().describe(\"Unix timestamp when the model was added.\"),\n pricing: OpenrouterListAvailableModels_PricingSchema.nullable(),\n description: z.string().describe(\"Detailed description of the model's capabilities.\"),\n architecture: OpenrouterListAvailableModels_ArchitectureSchema.nullable(),\n top_provider: OpenrouterListAvailableModels_TopProviderSchema.nullable(),\n canonical_slug: z.string().describe(\"Permanent slug for the model (immutable).\"),\n context_length: z.number().int().describe(\"Maximum context window size in tokens.\"),\n expiration_date: z.string().describe(\"ISO 8601 date when the model will be deprecated.\").nullable().optional(),\n hugging_face_id: z.string().describe(\"Identifier for the model on Hugging Face.\").nullable().optional(),\n default_parameters: OpenrouterListAvailableModels_DefaultParametersSchema.nullable(),\n per_request_limits: OpenrouterListAvailableModels_PerRequestLimitsSchema.nullable().optional(),\n supported_parameters: z.array(z.string()).describe(\"Supported API parameters for this model.\"),\n});\nexport const OpenrouterListAvailableModelsOutput: z.ZodTypeAny = z.object({\n data: z.array(OpenrouterListAvailableModels_ModelInfoSchema).describe(\"List of available models.\"),\n});\n\nexport const openrouterListAvailableModels = action(\"OPENROUTER_LIST_AVAILABLE_MODELS\", {\n slug: \"openrouter-list-available-models\",\n name: \"List Available Models\",\n description: \"Tool to list available models via OpenRouter API. Use after confirming authentication to fetch the model catalog. Use exact model IDs returned here in OPENROUTER_CREATE_CHAT_COMPLETION or OPENROUTER_CREATE_COMPLETION calls — hard-coded IDs may break when the catalog changes. Use exact author and slug values from this response as inputs to OPENROUTER_LIST_MODEL_ENDPOINTS. Models have varying capabilities (e.g., tools, reasoning); verify individual model capabilities before downstream use. Pricing and latency metadata may be null or approximate — handle missing values in routing logic.\",\n input: OpenrouterListAvailableModelsInput,\n output: OpenrouterListAvailableModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmD,EAAE,OAAO;CACvE,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CACrG,UAAU,EAAE,KAAK;EAAC;EAAe;EAAY;EAAa;EAAiB;EAAc;EAAW;EAAe;EAAS;EAAW;EAAU;EAAU;CAAU,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CACpO,oBAAoB,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gGAAgG,CAAC,CAAC,SAAS;AACrK,CAAC;AACD,MAAM,8CAA4D,EAAE,OAAO;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACrD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CAC7D,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7E,kBAAkB,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AAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/list-embedding-models.ts
|
|
4
|
+
const OpenrouterListEmbeddingModelsInput = zod.z.object({
|
|
5
|
+
"X-Title": zod.z.string().describe("The app display name allows you to customize how your app appears in OpenRouter's dashboard.").optional(),
|
|
6
|
+
"HTTP-Referer": zod.z.string().describe("The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.").optional()
|
|
7
|
+
});
|
|
8
|
+
const OpenrouterListEmbeddingModels_PricingSchema = zod.z.object({
|
|
9
|
+
image: zod.z.string().describe("Price per image.").nullable().optional(),
|
|
10
|
+
prompt: zod.z.string().describe("Price per prompt token."),
|
|
11
|
+
request: zod.z.string().describe("Price per request.").nullable().optional(),
|
|
12
|
+
completion: zod.z.string().describe("Price per completion token.")
|
|
13
|
+
});
|
|
14
|
+
const OpenrouterListEmbeddingModels_ArchitectureSchema = zod.z.object({
|
|
15
|
+
modality: zod.z.string().describe("Model modality (e.g., 'text->text').").nullable().optional(),
|
|
16
|
+
tokenizer: zod.z.string().describe("Tokenization method used."),
|
|
17
|
+
instruct_type: zod.z.string().describe("Instruction format type (e.g., 'chatml').").nullable().optional(),
|
|
18
|
+
input_modalities: zod.z.array(zod.z.string()).describe("Supported input types (e.g., 'text', 'image')."),
|
|
19
|
+
output_modalities: zod.z.array(zod.z.string()).describe("Supported output types (e.g., 'text').")
|
|
20
|
+
});
|
|
21
|
+
const OpenrouterListEmbeddingModels_TopProviderSchema = zod.z.object({
|
|
22
|
+
is_moderated: zod.z.boolean().describe("Indicates if the content is moderated."),
|
|
23
|
+
context_length: zod.z.number().int().describe("Maximum context window size in tokens for the top provider."),
|
|
24
|
+
max_completion_tokens: zod.z.number().int().describe("Maximum number of completion tokens.").nullable().optional()
|
|
25
|
+
});
|
|
26
|
+
const OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema = zod.z.object({
|
|
27
|
+
id: zod.z.string().describe("Unique model identifier."),
|
|
28
|
+
name: zod.z.string().describe("Human-readable display name for the model."),
|
|
29
|
+
created: zod.z.number().describe("Unix timestamp when the model was added."),
|
|
30
|
+
pricing: OpenrouterListEmbeddingModels_PricingSchema.nullable(),
|
|
31
|
+
description: zod.z.string().describe("Detailed description of the model's capabilities.").nullable().optional(),
|
|
32
|
+
architecture: OpenrouterListEmbeddingModels_ArchitectureSchema.nullable(),
|
|
33
|
+
top_provider: OpenrouterListEmbeddingModels_TopProviderSchema.nullable(),
|
|
34
|
+
canonical_slug: zod.z.string().describe("Permanent slug for the model (immutable)."),
|
|
35
|
+
context_length: zod.z.number().int().describe("Maximum context window size in tokens."),
|
|
36
|
+
expiration_date: zod.z.string().describe("Expiration date of the model, if applicable.").nullable().optional(),
|
|
37
|
+
hugging_face_id: zod.z.string().describe("Identifier for the model on Hugging Face.").nullable().optional(),
|
|
38
|
+
default_parameters: zod.z.object({}).describe("Default parameters for the model, or null if none.").nullable().optional(),
|
|
39
|
+
per_request_limits: zod.z.object({}).describe("Rate limiting information as a mapping of limit names to values, or null if no limits.").nullable().optional(),
|
|
40
|
+
supported_parameters: zod.z.array(zod.z.string()).describe("Supported API parameters for this model.")
|
|
41
|
+
});
|
|
42
|
+
const OpenrouterListEmbeddingModelsOutput = zod.z.object({ data: zod.z.array(OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema).describe("List of available embedding models.") });
|
|
43
|
+
const openrouterListEmbeddingModels = require_action.action("OPENROUTER_LIST_EMBEDDING_MODELS", {
|
|
44
|
+
slug: "openrouter-list-embedding-models",
|
|
45
|
+
name: "List Embedding Models",
|
|
46
|
+
description: "Tool to list all available embeddings models via OpenRouter API. Returns a list of embeddings models with their properties including architecture, pricing, and capabilities.",
|
|
47
|
+
input: OpenrouterListEmbeddingModelsInput,
|
|
48
|
+
output: OpenrouterListEmbeddingModelsOutput
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.openrouterListEmbeddingModels = openrouterListEmbeddingModels;
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=list-embedding-models.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-embedding-models.cjs","names":["z","action"],"sources":["../../src/actions/list-embedding-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterListEmbeddingModelsInput: z.ZodTypeAny = z.object({\n \"X-Title\": z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n \"HTTP-Referer\": z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n});\nconst OpenrouterListEmbeddingModels_PricingSchema: z.ZodTypeAny = z.object({\n image: z.string().describe(\"Price per image.\").nullable().optional(),\n prompt: z.string().describe(\"Price per prompt token.\"),\n request: z.string().describe(\"Price per request.\").nullable().optional(),\n completion: z.string().describe(\"Price per completion token.\"),\n});\nconst OpenrouterListEmbeddingModels_ArchitectureSchema: z.ZodTypeAny = z.object({\n modality: z.string().describe(\"Model modality (e.g., 'text->text').\").nullable().optional(),\n tokenizer: z.string().describe(\"Tokenization method used.\"),\n instruct_type: z.string().describe(\"Instruction format type (e.g., 'chatml').\").nullable().optional(),\n input_modalities: z.array(z.string()).describe(\"Supported input types (e.g., 'text', 'image').\"),\n output_modalities: z.array(z.string()).describe(\"Supported output types (e.g., 'text').\"),\n});\nconst OpenrouterListEmbeddingModels_TopProviderSchema: z.ZodTypeAny = z.object({\n is_moderated: z.boolean().describe(\"Indicates if the content is moderated.\"),\n context_length: z.number().int().describe(\"Maximum context window size in tokens for the top provider.\"),\n max_completion_tokens: z.number().int().describe(\"Maximum number of completion tokens.\").nullable().optional(),\n});\nconst OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique model identifier.\"),\n name: z.string().describe(\"Human-readable display name for the model.\"),\n created: z.number().describe(\"Unix timestamp when the model was added.\"),\n pricing: OpenrouterListEmbeddingModels_PricingSchema.nullable(),\n description: z.string().describe(\"Detailed description of the model's capabilities.\").nullable().optional(),\n architecture: OpenrouterListEmbeddingModels_ArchitectureSchema.nullable(),\n top_provider: OpenrouterListEmbeddingModels_TopProviderSchema.nullable(),\n canonical_slug: z.string().describe(\"Permanent slug for the model (immutable).\"),\n context_length: z.number().int().describe(\"Maximum context window size in tokens.\"),\n expiration_date: z.string().describe(\"Expiration date of the model, if applicable.\").nullable().optional(),\n hugging_face_id: z.string().describe(\"Identifier for the model on Hugging Face.\").nullable().optional(),\n default_parameters: z.object({}).describe(\"Default parameters for the model, or null if none.\").nullable().optional(),\n per_request_limits: z.object({}).describe(\"Rate limiting information as a mapping of limit names to values, or null if no limits.\").nullable().optional(),\n supported_parameters: z.array(z.string()).describe(\"Supported API parameters for this model.\"),\n});\nexport const OpenrouterListEmbeddingModelsOutput: z.ZodTypeAny = z.object({\n data: z.array(OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema).describe(\"List of available embedding models.\"),\n});\n\nexport const openrouterListEmbeddingModels = action(\"OPENROUTER_LIST_EMBEDDING_MODELS\", {\n slug: \"openrouter-list-embedding-models\",\n name: \"List Embedding Models\",\n description: \"Tool to list all available embeddings models via OpenRouter API. Returns a list of embeddings models with their properties including architecture, pricing, and capabilities.\",\n input: OpenrouterListEmbeddingModelsInput,\n output: OpenrouterListEmbeddingModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACxI,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACnM,CAAC;AACD,MAAM,8CAA4DA,IAAAA,EAAE,OAAO;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,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ZodTypeAny;
|
|
5
|
+
declare const OpenrouterListEmbeddingModelsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterListEmbeddingModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterListEmbeddingModels };
|
|
9
|
+
//# sourceMappingURL=list-embedding-models.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-embedding-models.d.cts","names":[],"sources":["../../src/actions/list-embedding-models.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAGjD;AAAA,cAmCW,mCAAA,EAAqC,CAAA,CAAE,UAElD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/list-embedding-models.d.ts
|
|
4
|
+
declare const OpenrouterListEmbeddingModelsInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterListEmbeddingModelsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterListEmbeddingModels: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterListEmbeddingModels };
|
|
9
|
+
//# sourceMappingURL=list-embedding-models.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-embedding-models.d.mts","names":[],"sources":["../../src/actions/list-embedding-models.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAGjD;AAAA,cAmCW,mCAAA,EAAqC,CAAA,CAAE,UAElD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/list-embedding-models.ts
|
|
4
|
+
const OpenrouterListEmbeddingModelsInput = z.object({
|
|
5
|
+
"X-Title": z.string().describe("The app display name allows you to customize how your app appears in OpenRouter's dashboard.").optional(),
|
|
6
|
+
"HTTP-Referer": z.string().describe("The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.").optional()
|
|
7
|
+
});
|
|
8
|
+
const OpenrouterListEmbeddingModels_PricingSchema = z.object({
|
|
9
|
+
image: z.string().describe("Price per image.").nullable().optional(),
|
|
10
|
+
prompt: z.string().describe("Price per prompt token."),
|
|
11
|
+
request: z.string().describe("Price per request.").nullable().optional(),
|
|
12
|
+
completion: z.string().describe("Price per completion token.")
|
|
13
|
+
});
|
|
14
|
+
const OpenrouterListEmbeddingModels_ArchitectureSchema = z.object({
|
|
15
|
+
modality: z.string().describe("Model modality (e.g., 'text->text').").nullable().optional(),
|
|
16
|
+
tokenizer: z.string().describe("Tokenization method used."),
|
|
17
|
+
instruct_type: z.string().describe("Instruction format type (e.g., 'chatml').").nullable().optional(),
|
|
18
|
+
input_modalities: z.array(z.string()).describe("Supported input types (e.g., 'text', 'image')."),
|
|
19
|
+
output_modalities: z.array(z.string()).describe("Supported output types (e.g., 'text').")
|
|
20
|
+
});
|
|
21
|
+
const OpenrouterListEmbeddingModels_TopProviderSchema = z.object({
|
|
22
|
+
is_moderated: z.boolean().describe("Indicates if the content is moderated."),
|
|
23
|
+
context_length: z.number().int().describe("Maximum context window size in tokens for the top provider."),
|
|
24
|
+
max_completion_tokens: z.number().int().describe("Maximum number of completion tokens.").nullable().optional()
|
|
25
|
+
});
|
|
26
|
+
const OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema = z.object({
|
|
27
|
+
id: z.string().describe("Unique model identifier."),
|
|
28
|
+
name: z.string().describe("Human-readable display name for the model."),
|
|
29
|
+
created: z.number().describe("Unix timestamp when the model was added."),
|
|
30
|
+
pricing: OpenrouterListEmbeddingModels_PricingSchema.nullable(),
|
|
31
|
+
description: z.string().describe("Detailed description of the model's capabilities.").nullable().optional(),
|
|
32
|
+
architecture: OpenrouterListEmbeddingModels_ArchitectureSchema.nullable(),
|
|
33
|
+
top_provider: OpenrouterListEmbeddingModels_TopProviderSchema.nullable(),
|
|
34
|
+
canonical_slug: z.string().describe("Permanent slug for the model (immutable)."),
|
|
35
|
+
context_length: z.number().int().describe("Maximum context window size in tokens."),
|
|
36
|
+
expiration_date: z.string().describe("Expiration date of the model, if applicable.").nullable().optional(),
|
|
37
|
+
hugging_face_id: z.string().describe("Identifier for the model on Hugging Face.").nullable().optional(),
|
|
38
|
+
default_parameters: z.object({}).describe("Default parameters for the model, or null if none.").nullable().optional(),
|
|
39
|
+
per_request_limits: z.object({}).describe("Rate limiting information as a mapping of limit names to values, or null if no limits.").nullable().optional(),
|
|
40
|
+
supported_parameters: z.array(z.string()).describe("Supported API parameters for this model.")
|
|
41
|
+
});
|
|
42
|
+
const openrouterListEmbeddingModels = action("OPENROUTER_LIST_EMBEDDING_MODELS", {
|
|
43
|
+
slug: "openrouter-list-embedding-models",
|
|
44
|
+
name: "List Embedding Models",
|
|
45
|
+
description: "Tool to list all available embeddings models via OpenRouter API. Returns a list of embeddings models with their properties including architecture, pricing, and capabilities.",
|
|
46
|
+
input: OpenrouterListEmbeddingModelsInput,
|
|
47
|
+
output: z.object({ data: z.array(OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema).describe("List of available embedding models.") })
|
|
48
|
+
});
|
|
49
|
+
//#endregion
|
|
50
|
+
export { openrouterListEmbeddingModels };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=list-embedding-models.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-embedding-models.mjs","names":[],"sources":["../../src/actions/list-embedding-models.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterListEmbeddingModelsInput: z.ZodTypeAny = z.object({\n \"X-Title\": z.string().describe(\"The app display name allows you to customize how your app appears in OpenRouter's dashboard.\").optional(),\n \"HTTP-Referer\": z.string().describe(\"The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.\").optional(),\n});\nconst OpenrouterListEmbeddingModels_PricingSchema: z.ZodTypeAny = z.object({\n image: z.string().describe(\"Price per image.\").nullable().optional(),\n prompt: z.string().describe(\"Price per prompt token.\"),\n request: z.string().describe(\"Price per request.\").nullable().optional(),\n completion: z.string().describe(\"Price per completion token.\"),\n});\nconst OpenrouterListEmbeddingModels_ArchitectureSchema: z.ZodTypeAny = z.object({\n modality: z.string().describe(\"Model modality (e.g., 'text->text').\").nullable().optional(),\n tokenizer: z.string().describe(\"Tokenization method used.\"),\n instruct_type: z.string().describe(\"Instruction format type (e.g., 'chatml').\").nullable().optional(),\n input_modalities: z.array(z.string()).describe(\"Supported input types (e.g., 'text', 'image').\"),\n output_modalities: z.array(z.string()).describe(\"Supported output types (e.g., 'text').\"),\n});\nconst OpenrouterListEmbeddingModels_TopProviderSchema: z.ZodTypeAny = z.object({\n is_moderated: z.boolean().describe(\"Indicates if the content is moderated.\"),\n context_length: z.number().int().describe(\"Maximum context window size in tokens for the top provider.\"),\n max_completion_tokens: z.number().int().describe(\"Maximum number of completion tokens.\").nullable().optional(),\n});\nconst OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique model identifier.\"),\n name: z.string().describe(\"Human-readable display name for the model.\"),\n created: z.number().describe(\"Unix timestamp when the model was added.\"),\n pricing: OpenrouterListEmbeddingModels_PricingSchema.nullable(),\n description: z.string().describe(\"Detailed description of the model's capabilities.\").nullable().optional(),\n architecture: OpenrouterListEmbeddingModels_ArchitectureSchema.nullable(),\n top_provider: OpenrouterListEmbeddingModels_TopProviderSchema.nullable(),\n canonical_slug: z.string().describe(\"Permanent slug for the model (immutable).\"),\n context_length: z.number().int().describe(\"Maximum context window size in tokens.\"),\n expiration_date: z.string().describe(\"Expiration date of the model, if applicable.\").nullable().optional(),\n hugging_face_id: z.string().describe(\"Identifier for the model on Hugging Face.\").nullable().optional(),\n default_parameters: z.object({}).describe(\"Default parameters for the model, or null if none.\").nullable().optional(),\n per_request_limits: z.object({}).describe(\"Rate limiting information as a mapping of limit names to values, or null if no limits.\").nullable().optional(),\n supported_parameters: z.array(z.string()).describe(\"Supported API parameters for this model.\"),\n});\nexport const OpenrouterListEmbeddingModelsOutput: z.ZodTypeAny = z.object({\n data: z.array(OpenrouterListEmbeddingModels_EmbeddingModelInfoSchema).describe(\"List of available embedding models.\"),\n});\n\nexport const openrouterListEmbeddingModels = action(\"OPENROUTER_LIST_EMBEDDING_MODELS\", {\n slug: \"openrouter-list-embedding-models\",\n name: \"List Embedding Models\",\n description: \"Tool to list all available embeddings models via OpenRouter API. Returns a list of embeddings models with their properties including architecture, pricing, and capabilities.\",\n input: OpenrouterListEmbeddingModelsInput,\n output: OpenrouterListEmbeddingModelsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmD,EAAE,OAAO;CACvE,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,8FAA8F,CAAC,CAAC,SAAS;CACxI,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,kJAAkJ,CAAC,CAAC,SAAS;AACnM,CAAC;AACD,MAAM,8CAA4D,EAAE,OAAO;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACrD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvE,YAAY,EAAE,OA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OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzG,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpH,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,wFAAwF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxJ,sBAAsB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,0CAA0C;AAC/F,CAAC;AAKD,MAAa,gCAAgC,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAT+D,EAAE,OAAO,EACxE,MAAM,EAAE,MAAM,sDAAsD,CAAC,CAAC,SAAS,qCAAqC,EACtH,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/list-model-endpoints.ts
|
|
4
|
+
const OpenrouterListModelEndpointsInput = zod.z.object({
|
|
5
|
+
slug: zod.z.string().describe("Model's unique slug under the author namespace (e.g., 'gpt4')."),
|
|
6
|
+
author: zod.z.string().describe("Model author's username as it appears in the model URL (e.g., 'anon'). Use exact value from OPENROUTER_LIST_AVAILABLE_MODELS — approximate or incorrect values return empty results.")
|
|
7
|
+
}).describe("Request parameters for listing endpoints of a specific model.");
|
|
8
|
+
const OpenrouterListModelEndpoints_PricingSchema = zod.z.object({
|
|
9
|
+
image: zod.z.string().describe("Cost per image operation.").nullable().optional(),
|
|
10
|
+
prompt: zod.z.string().describe("Cost per prompt token."),
|
|
11
|
+
request: zod.z.string().describe("Cost per request.").nullable().optional(),
|
|
12
|
+
completion: zod.z.string().describe("Cost per completion token."),
|
|
13
|
+
web_search: zod.z.string().describe("Cost per web search.").nullable().optional(),
|
|
14
|
+
image_output: zod.z.string().describe("Cost per output image.").nullable().optional(),
|
|
15
|
+
input_cache_read: zod.z.string().describe("Cost per input cache read.").nullable().optional(),
|
|
16
|
+
input_cache_write: zod.z.string().describe("Cost per input cache write.").nullable().optional(),
|
|
17
|
+
internal_reasoning: zod.z.string().describe("Cost per internal reasoning.").nullable().optional()
|
|
18
|
+
}).describe("Pricing rates for different usage metrics.");
|
|
19
|
+
const OpenrouterListModelEndpoints_EndpointInfoSchema = zod.z.object({
|
|
20
|
+
name: zod.z.string().describe("Endpoint identifier."),
|
|
21
|
+
pricing: OpenrouterListModelEndpoints_PricingSchema.nullable(),
|
|
22
|
+
provider_name: zod.z.string().describe("Name of the provider serving this endpoint."),
|
|
23
|
+
context_length: zod.z.number().describe("Maximum number of tokens in context."),
|
|
24
|
+
supported_parameters: zod.z.array(zod.z.string()).describe("List of supported parameter names for this endpoint.")
|
|
25
|
+
}).describe("Details for a single model endpoint.");
|
|
26
|
+
const OpenrouterListModelEndpoints_ArchitectureSchema = zod.z.object({
|
|
27
|
+
tokenizer: zod.z.string().describe("Tokenizer name used by the model."),
|
|
28
|
+
instruct_type: zod.z.string().describe("Instruction style/type (e.g., 'instruct').").nullable().optional(),
|
|
29
|
+
input_modalities: zod.z.array(zod.z.string()).describe("List of modalities accepted as input (e.g., ['text', 'image'])."),
|
|
30
|
+
output_modalities: zod.z.array(zod.z.string()).describe("List of modalities produced as output (e.g., ['text']).")
|
|
31
|
+
}).describe("Model architecture details.");
|
|
32
|
+
const OpenrouterListModelEndpoints_OpenrouterListModelEndpointsDataSchema = zod.z.object({
|
|
33
|
+
id: zod.z.string().describe("Unique model identifier."),
|
|
34
|
+
name: zod.z.string().describe("Human-readable model name."),
|
|
35
|
+
created: zod.z.number().describe("UNIX timestamp when model was created."),
|
|
36
|
+
endpoints: zod.z.array(OpenrouterListModelEndpoints_EndpointInfoSchema),
|
|
37
|
+
description: zod.z.string().describe("Model description.").nullable().optional(),
|
|
38
|
+
architecture: OpenrouterListModelEndpoints_ArchitectureSchema.nullable()
|
|
39
|
+
});
|
|
40
|
+
const OpenrouterListModelEndpointsOutput = zod.z.object({ data: OpenrouterListModelEndpoints_OpenrouterListModelEndpointsDataSchema.nullable() }).describe("Response schema for listing model endpoints.");
|
|
41
|
+
const openrouterListModelEndpoints = require_action.action("OPENROUTER_LIST_MODEL_ENDPOINTS", {
|
|
42
|
+
slug: "openrouter-list-model-endpoints",
|
|
43
|
+
name: "OpenRouter List Model Endpoints",
|
|
44
|
+
description: "Tool to list endpoints for a specific model. Use after specifying model author and slug to get endpoint details including pricing, context length, and supported parameters. Some metadata fields (e.g., latency, pricing) may be null or approximate; handle missing values in routing logic.",
|
|
45
|
+
input: OpenrouterListModelEndpointsInput,
|
|
46
|
+
output: OpenrouterListModelEndpointsOutput
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
exports.openrouterListModelEndpoints = openrouterListModelEndpoints;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=list-model-endpoints.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-model-endpoints.cjs","names":["z","action"],"sources":["../../src/actions/list-model-endpoints.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenrouterListModelEndpointsInput: z.ZodTypeAny = z.object({\n slug: z.string().describe(\"Model's unique slug under the author namespace (e.g., 'gpt4').\"),\n author: z.string().describe(\"Model author's username as it appears in the model URL (e.g., 'anon'). Use exact value from OPENROUTER_LIST_AVAILABLE_MODELS — approximate or incorrect values return empty results.\"),\n}).describe(\"Request parameters for listing endpoints of a specific model.\");\nconst OpenrouterListModelEndpoints_PricingSchema: z.ZodTypeAny = z.object({\n image: z.string().describe(\"Cost per image operation.\").nullable().optional(),\n prompt: z.string().describe(\"Cost per prompt token.\"),\n request: z.string().describe(\"Cost per request.\").nullable().optional(),\n completion: z.string().describe(\"Cost per completion token.\"),\n web_search: z.string().describe(\"Cost per web search.\").nullable().optional(),\n image_output: z.string().describe(\"Cost per output image.\").nullable().optional(),\n input_cache_read: z.string().describe(\"Cost per input cache read.\").nullable().optional(),\n input_cache_write: z.string().describe(\"Cost per input cache write.\").nullable().optional(),\n internal_reasoning: z.string().describe(\"Cost per internal reasoning.\").nullable().optional(),\n}).describe(\"Pricing rates for different usage metrics.\");\nconst OpenrouterListModelEndpoints_EndpointInfoSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Endpoint identifier.\"),\n pricing: OpenrouterListModelEndpoints_PricingSchema.nullable(),\n provider_name: z.string().describe(\"Name of the provider serving this endpoint.\"),\n context_length: z.number().describe(\"Maximum number of tokens in context.\"),\n supported_parameters: z.array(z.string()).describe(\"List of supported parameter names for this endpoint.\"),\n}).describe(\"Details for a single model endpoint.\");\nconst OpenrouterListModelEndpoints_ArchitectureSchema: z.ZodTypeAny = z.object({\n tokenizer: z.string().describe(\"Tokenizer name used by the model.\"),\n instruct_type: z.string().describe(\"Instruction style/type (e.g., 'instruct').\").nullable().optional(),\n input_modalities: z.array(z.string()).describe(\"List of modalities accepted as input (e.g., ['text', 'image']).\"),\n output_modalities: z.array(z.string()).describe(\"List of modalities produced as output (e.g., ['text']).\"),\n}).describe(\"Model architecture details.\");\nconst OpenrouterListModelEndpoints_OpenrouterListModelEndpointsDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique model identifier.\"),\n name: z.string().describe(\"Human-readable model name.\"),\n created: z.number().describe(\"UNIX timestamp when model was created.\"),\n endpoints: z.array(OpenrouterListModelEndpoints_EndpointInfoSchema),\n description: z.string().describe(\"Model description.\").nullable().optional(),\n architecture: OpenrouterListModelEndpoints_ArchitectureSchema.nullable(),\n});\nexport const OpenrouterListModelEndpointsOutput: z.ZodTypeAny = z.object({\n data: OpenrouterListModelEndpoints_OpenrouterListModelEndpointsDataSchema.nullable(),\n}).describe(\"Response schema for listing model endpoints.\");\n\nexport const openrouterListModelEndpoints = action(\"OPENROUTER_LIST_MODEL_ENDPOINTS\", {\n slug: \"openrouter-list-model-endpoints\",\n name: \"OpenRouter List Model Endpoints\",\n description: \"Tool to list endpoints for a specific model. Use after specifying model author and slug to get endpoint details including pricing, context length, and supported parameters. Some metadata fields (e.g., latency, pricing) may be null or approximate; handle missing values in routing logic.\",\n input: OpenrouterListModelEndpointsInput,\n output: OpenrouterListModelEndpointsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAkDA,IAAAA,EAAE,OAAO;CACtE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE;CAC1F,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sLAAsL;AACpN,CAAC,CAAC,CAAC,SAAS,+DAA+D;AAC3E,MAAM,6CAA2DA,IAAAA,EAAE,OAAO;CACxE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB;CACpD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;CAC5D,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5E,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxF,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAA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SAAS,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3E,cAAc,gDAAgD,SAAS;AACzE,CAAC;AACD,MAAa,qCAAmDA,IAAAA,EAAE,OAAO,EACvE,MAAM,oEAAoE,SAAS,EACrF,CAAC,CAAC,CAAC,SAAS,8CAA8C;AAE1D,MAAa,+BAA+BC,eAAAA,OAAO,mCAAmC;CACpF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/list-model-endpoints.d.ts
|
|
4
|
+
declare const OpenrouterListModelEndpointsInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterListModelEndpointsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterListModelEndpoints: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterListModelEndpoints };
|
|
9
|
+
//# sourceMappingURL=list-model-endpoints.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-model-endpoints.d.cts","names":[],"sources":["../../src/actions/list-model-endpoints.ts"],"mappings":";;;cAIa,iCAAA,EAAmC,CAAA,CAAE,UAG0B;AAAA,cAiC/D,kCAAA,EAAoC,CAAA,CAAE,UAEQ;AAAA,cAE9C,4BAAA,gCAA4B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/list-model-endpoints.d.ts
|
|
4
|
+
declare const OpenrouterListModelEndpointsInput: z.ZodTypeAny;
|
|
5
|
+
declare const OpenrouterListModelEndpointsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const openrouterListModelEndpoints: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { openrouterListModelEndpoints };
|
|
9
|
+
//# sourceMappingURL=list-model-endpoints.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-model-endpoints.d.mts","names":[],"sources":["../../src/actions/list-model-endpoints.ts"],"mappings":";;;cAIa,iCAAA,EAAmC,CAAA,CAAE,UAG0B;AAAA,cAiC/D,kCAAA,EAAoC,CAAA,CAAE,UAEQ;AAAA,cAE9C,4BAAA,gCAA4B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|