pi-free 2.0.11 → 2.0.13

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.
@@ -97,8 +97,9 @@ async function fetchZenmuxModels(
97
97
 
98
98
  _logger.info(`[zenmux] Fetched ${models.length} models`);
99
99
 
100
- return models.map(
101
- (m): ProviderModelConfig => ({
100
+ return models.map((m) => {
101
+ const hasPricings = m.pricings !== undefined;
102
+ return {
102
103
  id: m.id,
103
104
  name: m.display_name || m.id,
104
105
  reasoning: m.capabilities?.reasoning ?? false,
@@ -114,8 +115,9 @@ async function fetchZenmuxModels(
114
115
  contextWindow: m.context_length || 128000,
115
116
  maxTokens: m.context_length ? Math.floor(m.context_length / 2) : 4096,
116
117
  compat: getProxyModelCompat(m),
117
- }),
118
- );
118
+ _pricingKnown: hasPricings,
119
+ } as ProviderModelConfig & { _pricingKnown?: boolean };
120
+ });
119
121
  } catch (error) {
120
122
  _logger.error("[zenmux] Failed to fetch models:", {
121
123
  error: error instanceof Error ? error.message : String(error),