@charmland/pi-hyper-provider 0.2.0 → 0.2.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/models.ts +2 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charmland/pi-hyper-provider",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Pi extension for Charm's Hyper inference provider",
5
5
  "license": "MIT",
6
6
  "keywords": [
package/src/models.ts CHANGED
@@ -78,10 +78,8 @@ function toProviderModel(model: ProviderModel): Model<"openai-completions"> {
78
78
  cost: {
79
79
  input: model.cost_per_1m_in,
80
80
  output: model.cost_per_1m_out,
81
- cacheRead: model.cost_per_1m_in_cached,
82
- // Hyper exposes cached input/output prices, but Pi only models cached
83
- // input reads and cache writes. Hyper does not expose a cache-write price.
84
- cacheWrite: 0,
81
+ cacheRead: model.cost_per_1m_out_cached ?? 0,
82
+ cacheWrite: model.cost_per_1m_in_cached,
85
83
  },
86
84
  contextWindow: model.context_window,
87
85
  maxTokens: model.default_max_tokens,