anycodex 0.0.25 → 0.0.26

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/dist/bin.js +24 -1
  2. package/package.json +3 -3
package/dist/bin.js CHANGED
@@ -17687,7 +17687,30 @@ var CodeAgent = class extends EventEmitter {
17687
17687
  },
17688
17688
  search: this.options.search,
17689
17689
  dataPath: this.options.dataPath,
17690
- configOverrides: this.options.config,
17690
+ configOverrides: {
17691
+ ...this.options.config,
17692
+ // Inject cost from CodeAgentProvider into the provider model definition
17693
+ ...this.options.provider.cost ? {
17694
+ provider: {
17695
+ ...this.options.config?.provider,
17696
+ [this.options.provider.id]: {
17697
+ ...this.options.config?.provider?.[this.options.provider.id],
17698
+ models: {
17699
+ ...this.options.config?.provider?.[this.options.provider.id]?.models,
17700
+ [this.options.provider.model]: {
17701
+ ...this.options.config?.provider?.[this.options.provider.id]?.models?.[this.options.provider.model],
17702
+ cost: {
17703
+ input: this.options.provider.cost.input,
17704
+ output: this.options.provider.cost.output,
17705
+ cache_read: this.options.provider.cost.cacheRead ?? 0,
17706
+ cache_write: this.options.provider.cost.cacheWrite ?? 0
17707
+ }
17708
+ }
17709
+ }
17710
+ }
17711
+ }
17712
+ } : {}
17713
+ },
17691
17714
  instructions: this.options.instructions,
17692
17715
  db: this._dbClient,
17693
17716
  tools: [...this.options.tools ?? []],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anycodex",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -18,8 +18,8 @@
18
18
  "@types/node": "^25.5.0",
19
19
  "tsup": "^8.4.0",
20
20
  "typescript": "^5.7.0",
21
- "@any-code/app": "0.0.2",
22
- "@any-code/server": "0.0.6"
21
+ "@any-code/server": "0.0.7",
22
+ "@any-code/app": "0.0.3"
23
23
  },
24
24
  "scripts": {
25
25
  "build": "tsup"