lynkr 9.7.2 → 9.9.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 +29 -19
- package/bin/cli.js +11 -0
- package/bin/lynkr-init.js +14 -1
- package/bin/lynkr-usage.js +78 -0
- package/bin/wrap.js +60 -35
- package/config/difficulty-anchors.json +22 -0
- package/package.json +24 -3
- package/scripts/audit-log-reader.js +399 -0
- package/scripts/calibrate-thresholds.js +38 -157
- package/scripts/compact-dictionary.js +204 -0
- package/scripts/test-deduplication.js +448 -0
- package/scripts/ws7-anchor-replay.js +108 -0
- package/skills/lynkr/SKILL.md +195 -0
- package/src/agents/context-manager.js +18 -2
- package/src/agents/definitions/loader.js +90 -0
- package/src/agents/executor.js +24 -2
- package/src/agents/index.js +9 -1
- package/src/agents/parallel-coordinator.js +2 -2
- package/src/agents/reflector.js +11 -1
- package/src/api/middleware/loop-guard.js +87 -0
- package/src/api/middleware/request-logging.js +5 -64
- package/src/api/middleware/session.js +0 -0
- package/src/api/openai-router.js +120 -101
- package/src/api/providers-handler.js +27 -2
- package/src/api/router.js +450 -125
- package/src/budget/index.js +2 -19
- package/src/cache/semantic.js +9 -0
- package/src/clients/databricks.js +459 -146
- package/src/clients/gpt-utils.js +11 -105
- package/src/clients/openai-format.js +10 -3
- package/src/clients/openrouter-utils.js +49 -24
- package/src/clients/prompt-cache-injection.js +1 -0
- package/src/clients/provider-capabilities.js +1 -1
- package/src/clients/responses-format.js +34 -3
- package/src/clients/routing.js +15 -0
- package/src/config/index.js +36 -2
- package/src/context/gcf.js +275 -0
- package/src/context/tool-result-compressor.js +51 -9
- package/src/dashboard/api.js +1 -0
- package/src/logger/index.js +14 -1
- package/src/memory/search.js +12 -40
- package/src/memory/tools.js +3 -24
- package/src/orchestrator/bypass.js +4 -2
- package/src/orchestrator/index.js +144 -88
- package/src/routing/affinity-store.js +194 -0
- package/src/routing/agentic-detector.js +36 -6
- package/src/routing/bandit.js +25 -6
- package/src/routing/calibration.js +212 -0
- package/src/routing/client-profiles.js +292 -0
- package/src/routing/complexity-analyzer.js +48 -11
- package/src/routing/deescalator.js +148 -0
- package/src/routing/degradation.js +109 -0
- package/src/routing/feedback.js +157 -0
- package/src/routing/index.js +897 -87
- package/src/routing/intent-score.js +339 -0
- package/src/routing/interaction.js +3 -0
- package/src/routing/knn-router.js +70 -21
- package/src/routing/model-registry.js +28 -7
- package/src/routing/model-tiers.js +25 -2
- package/src/routing/reward-pipeline.js +68 -2
- package/src/routing/risk-analyzer.js +30 -1
- package/src/routing/risk-classifier.js +6 -2
- package/src/routing/session-affinity.js +162 -34
- package/src/routing/telemetry.js +298 -10
- package/src/routing/verifier.js +267 -0
- package/src/server.js +66 -21
- package/src/sessions/cleanup.js +17 -0
- package/src/tools/index.js +1 -15
- package/src/tools/smart-selection.js +10 -0
- package/src/tools/web-client.js +3 -3
- package/.eslintrc.cjs +0 -12
- package/benchmark-configs/litellm_config.yaml +0 -86
- package/benchmark-configs/lynkr.env +0 -48
- package/benchmark-configs/portkey-config.json +0 -60
- package/benchmark-configs/portkey-docker.sh +0 -23
- package/benchmark-tier-routing.js +0 -449
- package/funding.json +0 -110
- package/src/api/middleware/validation.js +0 -261
- package/src/routing/drift-monitor.js +0 -113
- package/src/workers/helpers.js +0 -185
|
@@ -124,6 +124,23 @@ function getConfiguredProviders() {
|
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
// Check Eden AI (OpenAI-compatible gateway, EU/GDPR)
|
|
128
|
+
if (config.edenai?.apiKey) {
|
|
129
|
+
providers.push({
|
|
130
|
+
name: "edenai",
|
|
131
|
+
type: "edenai",
|
|
132
|
+
baseUrl: "https://api.edenai.run/v3",
|
|
133
|
+
enabled: true,
|
|
134
|
+
models: [
|
|
135
|
+
{ id: config.edenai.model || "openai/gpt-4o-mini", name: "Configured Model" },
|
|
136
|
+
{ id: "anthropic/claude-sonnet-4-5", name: "Claude Sonnet 4.5" },
|
|
137
|
+
{ id: "openai/gpt-4o", name: "GPT-4o" },
|
|
138
|
+
{ id: "openai/gpt-4o-mini", name: "GPT-4o Mini" },
|
|
139
|
+
{ id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash" }
|
|
140
|
+
]
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
127
144
|
// Check Ollama
|
|
128
145
|
if (config.ollama?.endpoint) {
|
|
129
146
|
providers.push({
|
|
@@ -496,8 +513,16 @@ router.get("/routing/stats", (req, res) => {
|
|
|
496
513
|
const until = req.query.until ? Number(req.query.until) : undefined;
|
|
497
514
|
const stats = telemetry.getStats({ since, until });
|
|
498
515
|
|
|
516
|
+
// Degradation counts are always available (in-memory), even when there's
|
|
517
|
+
// zero telemetry data yet — surface them regardless of the stats branch.
|
|
518
|
+
const degradation = require("../routing/degradation").getCounts();
|
|
519
|
+
|
|
499
520
|
if (!stats) {
|
|
500
|
-
return res.json({
|
|
521
|
+
return res.json({
|
|
522
|
+
object: "routing_stats",
|
|
523
|
+
data: { degradation },
|
|
524
|
+
message: "No telemetry data available",
|
|
525
|
+
});
|
|
501
526
|
}
|
|
502
527
|
|
|
503
528
|
// Merge latency tracker percentiles
|
|
@@ -509,7 +534,7 @@ router.get("/routing/stats", (req, res) => {
|
|
|
509
534
|
|
|
510
535
|
res.json({
|
|
511
536
|
object: "routing_stats",
|
|
512
|
-
data: { ...stats, latencyPercentiles: latencyStats },
|
|
537
|
+
data: { ...stats, latencyPercentiles: latencyStats, degradation },
|
|
513
538
|
timestamp: new Date().toISOString(),
|
|
514
539
|
});
|
|
515
540
|
} catch (error) {
|