portable-agent-layer 0.105.0 → 0.106.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,6 +1,6 @@
1
1
  {
2
2
  "name": "portable-agent-layer",
3
- "version": "0.105.0",
3
+ "version": "0.106.0",
4
4
  "description": "PAL — Portable Agent Layer: persistent personal context for AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {
@@ -115,8 +115,48 @@ interface SupersededRates {
115
115
  /** A model's earlier rates, oldest first; a price change moves today's row here. */
116
116
  export const PRICE_HISTORY: Record<string, SupersededRates[]> = {};
117
117
 
118
- /** Pricing per million tokens (USD) in force today — from https://platform.claude.com/docs/en/about-claude/pricing */
118
+ const withoutWritePremium = (
119
+ input: number,
120
+ cacheRead: number,
121
+ output: number
122
+ ): ModelPricing => ({
123
+ input,
124
+ output,
125
+ cacheWrite5m: input,
126
+ cacheWrite1h: input,
127
+ cacheRead,
128
+ });
129
+
130
+ /**
131
+ * Standard-tier rates from https://developers.openai.com/api/docs/pricing; prompts over
132
+ * 272K tokens cost more, and PAL's never get there. OpenAI bills no cache-write premium.
133
+ */
134
+ const OPENAI_PRICING: Record<string, ModelPricing> = {
135
+ "gpt-6-astra": withoutWritePremium(10, 1, 50),
136
+ "gpt-6.1-sol": withoutWritePremium(2, 0.1, 10),
137
+ "gpt-6-sol": withoutWritePremium(2, 0.2, 10),
138
+ "gpt-6-luna": withoutWritePremium(0.1, 0.01, 0.5),
139
+ "gpt-5.6-sol": withoutWritePremium(4, 0.4, 20),
140
+ "gpt-5.6-terra": withoutWritePremium(2, 0.2, 12),
141
+ "gpt-5.6-luna": withoutWritePremium(0.2, 0.02, 1.2),
142
+ "gpt-5.5": withoutWritePremium(5, 0.5, 30),
143
+ "gpt-5.5-pro": withoutWritePremium(30, 30, 180),
144
+ "gpt-5.4": withoutWritePremium(2.5, 0.25, 15),
145
+ "gpt-5.4-pro": withoutWritePremium(30, 30, 180),
146
+ "gpt-5.4-mini": withoutWritePremium(0.75, 0.075, 4.5),
147
+ "gpt-5.4-nano": withoutWritePremium(0.2, 0.02, 1.25),
148
+ "gpt-5.3-codex": withoutWritePremium(1.75, 0.175, 14),
149
+ };
150
+
151
+ /** Standard-tier serverless rates from https://docs.fireworks.ai/serverless/pricing */
152
+ const FIREWORKS_PRICING: Record<string, ModelPricing> = {
153
+ "fireworks-ai/accounts/fireworks/models/kimi-k3": withoutWritePremium(3, 0.3, 15),
154
+ };
155
+
156
+ /** Pricing per million tokens (USD) in force today; Claude's from https://platform.claude.com/docs/en/about-claude/pricing */
119
157
  export const MODEL_PRICING: Record<string, ModelPricing> = {
158
+ ...OPENAI_PRICING,
159
+ ...FIREWORKS_PRICING,
120
160
  [HAIKU_MODEL]: {
121
161
  input: 1,
122
162
  output: 5,