@ainyc/canonry 4.99.1 → 4.100.1
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.
|
@@ -655,7 +655,7 @@ cnry agent memory forget <project> --key <k>
|
|
|
655
655
|
`openai` → `google` → `zai` → `deepinfra`, whichever has an API key present
|
|
656
656
|
first (from `~/.canonry/config.yaml` providers block, or the matching env var
|
|
657
657
|
`ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY` / `ZAI_API_KEY` /
|
|
658
|
-
`DEEPINFRA_TOKEN`). `deepinfra` (GLM-5.2
|
|
658
|
+
`DEEPINFRA_TOKEN`). `deepinfra` (GLM-5.2) is a
|
|
659
659
|
Western-hosted OpenAI-compatible host — useful when the agent / analyze /
|
|
660
660
|
classify tiers must avoid PRC-hosted GLM (`zai`).
|
|
661
661
|
|
|
@@ -8020,12 +8020,13 @@ var PROVIDER_MODELS = {
|
|
|
8020
8020
|
[LlmCapabilities.classify]: "glm-5-turbo"
|
|
8021
8021
|
},
|
|
8022
8022
|
[AgentProviderIds.deepinfra]: {
|
|
8023
|
-
// DeepInfra `org/Model` slugs. GLM-5.2
|
|
8024
|
-
//
|
|
8025
|
-
// custom openai-completions model, not pi-ai's
|
|
8023
|
+
// DeepInfra `org/Model` slugs. GLM-5.2 (Sonnet-class) on all three tiers —
|
|
8024
|
+
// it undercuts the Claude tiers it replaces, so the cheaper tiers take no
|
|
8025
|
+
// quality hit. Resolved into a custom openai-completions model, not pi-ai's
|
|
8026
|
+
// catalog.
|
|
8026
8027
|
[LlmCapabilities.agent]: "zai-org/GLM-5.2",
|
|
8027
|
-
[LlmCapabilities.analyze]: "
|
|
8028
|
-
[LlmCapabilities.classify]: "
|
|
8028
|
+
[LlmCapabilities.analyze]: "zai-org/GLM-5.2",
|
|
8029
|
+
[LlmCapabilities.classify]: "zai-org/GLM-5.2"
|
|
8029
8030
|
}
|
|
8030
8031
|
};
|
|
8031
8032
|
var AGENT_PROVIDERS = {
|
|
@@ -8130,7 +8131,8 @@ function resolveModelForCapability(provider, capability, modelIdOverride) {
|
|
|
8130
8131
|
const entry = AGENT_PROVIDERS[provider];
|
|
8131
8132
|
const id = modelIdOverride ?? PROVIDER_MODELS[provider][capability];
|
|
8132
8133
|
if (entry.openaiCompatible) {
|
|
8133
|
-
|
|
8134
|
+
const suppressThinking = capability !== LlmCapabilities.agent;
|
|
8135
|
+
return buildOpenAiCompatibleModel(entry, id, suppressThinking);
|
|
8134
8136
|
}
|
|
8135
8137
|
const model = getModel(entry.piAiProvider, id);
|
|
8136
8138
|
if (!model) {
|
|
@@ -8140,13 +8142,14 @@ function resolveModelForCapability(provider, capability, modelIdOverride) {
|
|
|
8140
8142
|
}
|
|
8141
8143
|
return model;
|
|
8142
8144
|
}
|
|
8143
|
-
function buildOpenAiCompatibleModel(entry, id) {
|
|
8145
|
+
function buildOpenAiCompatibleModel(entry, id, suppressThinking = false) {
|
|
8144
8146
|
const host = entry.openaiCompatible;
|
|
8145
8147
|
if (!host) {
|
|
8146
8148
|
throw new Error(`buildOpenAiCompatibleModel called for non-custom provider '${entry.piAiProvider}'`);
|
|
8147
8149
|
}
|
|
8148
8150
|
const meta = host.knownModels[id] ?? host.defaultModelMeta;
|
|
8149
8151
|
const baseUrl = (host.baseUrlEnvVar ? process.env[host.baseUrlEnvVar] : void 0) || host.baseUrl;
|
|
8152
|
+
const compat = suppressThinking ? { ...host.compat, thinkingFormat: "qwen-chat-template" } : host.compat;
|
|
8150
8153
|
return {
|
|
8151
8154
|
id,
|
|
8152
8155
|
name: id,
|
|
@@ -8158,7 +8161,7 @@ function buildOpenAiCompatibleModel(entry, id) {
|
|
|
8158
8161
|
cost: meta.cost,
|
|
8159
8162
|
contextWindow: meta.contextWindow,
|
|
8160
8163
|
maxTokens: meta.maxTokens,
|
|
8161
|
-
...
|
|
8164
|
+
...compat ? { compat } : {}
|
|
8162
8165
|
};
|
|
8163
8166
|
}
|
|
8164
8167
|
function validateAgentProviderRegistry() {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainyc/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.100.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -62,27 +62,27 @@
|
|
|
62
62
|
"@types/node-cron": "^3.0.11",
|
|
63
63
|
"tsup": "^8.5.1",
|
|
64
64
|
"tsx": "^4.19.0",
|
|
65
|
-
"@ainyc/canonry-api-routes": "0.0.0",
|
|
66
65
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
66
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
67
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
67
68
|
"@ainyc/canonry-db": "0.0.0",
|
|
68
69
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
69
70
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
70
|
-
"@ainyc/canonry-
|
|
71
|
-
"@ainyc/canonry-config": "0.0.0",
|
|
71
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
72
72
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
73
|
-
"@ainyc/canonry-integration-
|
|
73
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
74
74
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
75
|
-
"@ainyc/canonry-
|
|
75
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
76
76
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
77
|
-
"@ainyc/canonry-intelligence": "0.0.0",
|
|
78
77
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
79
78
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
79
|
+
"@ainyc/canonry-intelligence": "0.0.0",
|
|
80
80
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
81
81
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
82
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
83
82
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
84
|
-
"@ainyc/canonry-provider-
|
|
85
|
-
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
83
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
84
|
+
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
85
|
+
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|