oh-pi 0.1.47 → 0.1.48

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.
@@ -60,11 +60,8 @@ export function applyConfig(config) {
60
60
  const primary = config.providers.find(p => p.baseUrl && p.defaultModel) ?? config.providers[0];
61
61
  const providerInfo = primary ? PROVIDERS[primary.name] : undefined;
62
62
  const compactThreshold = config.compactThreshold ?? 0.75;
63
+ const reserveTokens = 32000;
63
64
  const primaryModel = primary?.defaultModel ?? providerInfo?.models[0];
64
- const primaryDisc = primary?.discoveredModels?.find(m => m.id === primaryModel);
65
- const primaryCaps = primaryModel ? MODEL_CAPABILITIES[primaryModel] : undefined;
66
- const contextWindow = primaryDisc?.contextWindow ?? primary?.contextWindow ?? primaryCaps?.contextWindow ?? 128000;
67
- const reserveTokens = Math.round(contextWindow * (1 - compactThreshold));
68
65
  const settings = {
69
66
  ...(primary ? { defaultProvider: primary.name, defaultModel: primaryModel } : {}),
70
67
  defaultThinkingLevel: config.thinking,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-pi",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "One-click setup for pi-coding-agent. Like oh-my-zsh for pi.",
5
5
  "type": "module",
6
6
  "bin": {