@theokit/sdk 4.16.6 → 4.16.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.16.7
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(session): a model-prefix profile only wins the summarizer route when its credential is actually RESOLVABLE (oauth/none own their auth; api_key needs one of the profile's env vars set) — an `openai` prefix with only OPENROUTER_API_KEY in the environment now falls through to env detection instead of failing with "No provider client".
8
+
3
9
  ## 4.16.6
4
10
 
5
11
  ### Patch Changes
package/dist/cron.cjs CHANGED
@@ -6064,10 +6064,12 @@ function buildDefaultSummarizer(opts) {
6064
6064
  return async (messages) => {
6065
6065
  registerBuiltins();
6066
6066
  const modelPrefix = opts.agentModel.includes("/") ? opts.agentModel.slice(0, opts.agentModel.indexOf("/")) : void 0;
6067
+ const prefixProfile = modelPrefix !== void 0 ? getProviderProfile(modelPrefix) : void 0;
6068
+ const prefixUsable = prefixProfile !== void 0 && (prefixProfile.authType !== "api_key" || prefixProfile.envVars.some((v) => (process.env[v] ?? "").length > 0));
6067
6069
  const route = resolveSummarizerRoute({
6068
6070
  keyProvider: inferProviderFromApiKey(opts.apiKey),
6069
6071
  modelPrefix,
6070
- prefixHasProfile: modelPrefix !== void 0 && getProviderProfile(modelPrefix) !== void 0,
6072
+ prefixHasProfile: prefixUsable,
6071
6073
  envProvider: detectPrimaryProvider()
6072
6074
  });
6073
6075
  const provider = route.provider;