opencode-plugin-litellm 0.8.0 → 0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "opencode-plugin-litellm",
4
- "version": "0.8.0",
4
+ "version": "0.9.0",
5
5
  "description": "OpenCode plugin for LiteLLM proxy support with auto-detection and dynamic model discovery",
6
6
  "type": "module",
7
7
  "main": "./src/index.ts",
@@ -54,9 +54,12 @@ export function buildModelV2(
54
54
  interleaved: false,
55
55
  },
56
56
  cost: {
57
- input: 0,
58
- output: 0,
59
- cache: { read: 0, write: 0 },
57
+ input: info?.input_cost_per_token ?? 0,
58
+ output: info?.output_cost_per_token ?? 0,
59
+ cache: {
60
+ read: info?.cache_read_input_token_cost ?? 0,
61
+ write: info?.cache_creation_input_token_cost ?? 0,
62
+ },
60
63
  },
61
64
  limit: {
62
65
  context: model.max_input_tokens ?? 0,
@@ -69,6 +69,8 @@ export interface LiteLLMModelInfo {
69
69
  supports_audio_input?: boolean
70
70
  input_cost_per_token?: number
71
71
  output_cost_per_token?: number
72
+ cache_read_input_token_cost?: number
73
+ cache_creation_input_token_cost?: number
72
74
  }
73
75
 
74
76
  /** A single entry returned by LiteLLM's `/v1/model/info` endpoint. */