@agi-cli/sdk 0.1.100 → 0.1.101

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": "@agi-cli/sdk",
3
- "version": "0.1.100",
3
+ "version": "0.1.101",
4
4
  "description": "AI agent SDK for building intelligent assistants - tree-shakable and comprehensive",
5
5
  "author": "ntishxyz",
6
6
  "license": "MIT",
@@ -7,7 +7,16 @@ import type {
7
7
  type CatalogMap = Partial<Record<ProviderId, ProviderCatalogEntry>>;
8
8
 
9
9
  const SOLFORGE_ID: ProviderId = 'solforge';
10
- const ACCEPTED_BINDINGS = new Set(['@ai-sdk/openai', '@ai-sdk/anthropic']);
10
+ const SOLFORGE_SOURCES: Array<{ id: ProviderId; npm: string }> = [
11
+ {
12
+ id: 'openai',
13
+ npm: '@ai-sdk/openai',
14
+ },
15
+ {
16
+ id: 'anthropic',
17
+ npm: '@ai-sdk/anthropic',
18
+ },
19
+ ];
11
20
 
12
21
  function cloneModel(model: ModelInfo): ModelInfo {
13
22
  return {
@@ -29,13 +38,14 @@ function cloneModel(model: ModelInfo): ModelInfo {
29
38
  }
30
39
 
31
40
  function buildSolforgeEntry(base: CatalogMap): ProviderCatalogEntry | null {
32
- const opencodeModels = base.opencode?.models ?? [];
33
- const solforgeModels = opencodeModels
34
- .filter((model) => {
35
- const npm = model.provider?.npm;
36
- return npm != null && ACCEPTED_BINDINGS.has(npm);
37
- })
38
- .map(cloneModel);
41
+ const solforgeModels = SOLFORGE_SOURCES.flatMap(({ id, npm }) => {
42
+ const sourceModels = base[id]?.models ?? [];
43
+ return sourceModels.map((model) => {
44
+ const cloned = cloneModel(model);
45
+ cloned.provider = { ...(cloned.provider ?? {}), npm };
46
+ return cloned;
47
+ });
48
+ });
39
49
 
40
50
  if (!solforgeModels.length) return null;
41
51