@openadapter/koda-ai 1.0.0-beta.3

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 (110) hide show
  1. package/README.md +1385 -0
  2. package/dist/api-registry.d.ts +19 -0
  3. package/dist/api-registry.js +1 -0
  4. package/dist/bedrock-provider.d.ts +4 -0
  5. package/dist/bedrock-provider.js +1 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +24 -0
  8. package/dist/env-api-keys.d.ts +17 -0
  9. package/dist/env-api-keys.js +1 -0
  10. package/dist/image-models.d.ts +9 -0
  11. package/dist/image-models.generated.d.ts +454 -0
  12. package/dist/image-models.generated.js +1 -0
  13. package/dist/image-models.js +1 -0
  14. package/dist/images-api-registry.d.ts +13 -0
  15. package/dist/images-api-registry.js +1 -0
  16. package/dist/images.d.ts +3 -0
  17. package/dist/images.js +1 -0
  18. package/dist/index.d.ts +31 -0
  19. package/dist/index.js +1 -0
  20. package/dist/models.d.ts +17 -0
  21. package/dist/models.generated.d.ts +18136 -0
  22. package/dist/models.generated.js +1 -0
  23. package/dist/models.js +1 -0
  24. package/dist/oauth.d.ts +1 -0
  25. package/dist/oauth.js +1 -0
  26. package/dist/providers/amazon-bedrock.d.ts +37 -0
  27. package/dist/providers/amazon-bedrock.js +1 -0
  28. package/dist/providers/anthropic.d.ts +70 -0
  29. package/dist/providers/anthropic.js +5 -0
  30. package/dist/providers/azure-openai-responses.d.ts +14 -0
  31. package/dist/providers/azure-openai-responses.js +1 -0
  32. package/dist/providers/cloudflare.d.ts +12 -0
  33. package/dist/providers/cloudflare.js +1 -0
  34. package/dist/providers/faux.d.ts +55 -0
  35. package/dist/providers/faux.js +6 -0
  36. package/dist/providers/github-copilot-headers.d.ts +7 -0
  37. package/dist/providers/github-copilot-headers.js +1 -0
  38. package/dist/providers/google-shared.d.ts +69 -0
  39. package/dist/providers/google-shared.js +2 -0
  40. package/dist/providers/google-vertex.d.ts +14 -0
  41. package/dist/providers/google-vertex.js +1 -0
  42. package/dist/providers/google.d.ts +12 -0
  43. package/dist/providers/google.js +1 -0
  44. package/dist/providers/images/openrouter.d.ts +2 -0
  45. package/dist/providers/images/openrouter.js +1 -0
  46. package/dist/providers/images/register-builtins.d.ts +3 -0
  47. package/dist/providers/images/register-builtins.js +1 -0
  48. package/dist/providers/mistral.d.ts +24 -0
  49. package/dist/providers/mistral.js +3 -0
  50. package/dist/providers/openai-codex-responses.d.ts +29 -0
  51. package/dist/providers/openai-codex-responses.js +7 -0
  52. package/dist/providers/openai-completions.d.ts +18 -0
  53. package/dist/providers/openai-completions.js +6 -0
  54. package/dist/providers/openai-prompt-cache.d.ts +2 -0
  55. package/dist/providers/openai-prompt-cache.js +1 -0
  56. package/dist/providers/openai-responses-shared.d.ts +17 -0
  57. package/dist/providers/openai-responses-shared.js +12 -0
  58. package/dist/providers/openai-responses.d.ts +12 -0
  59. package/dist/providers/openai-responses.js +1 -0
  60. package/dist/providers/register-builtins.d.ts +34 -0
  61. package/dist/providers/register-builtins.js +1 -0
  62. package/dist/providers/simple-options.d.ts +7 -0
  63. package/dist/providers/simple-options.js +1 -0
  64. package/dist/providers/transform-messages.d.ts +7 -0
  65. package/dist/providers/transform-messages.js +1 -0
  66. package/dist/session-resources.d.ts +3 -0
  67. package/dist/session-resources.js +1 -0
  68. package/dist/stream.d.ts +7 -0
  69. package/dist/stream.js +1 -0
  70. package/dist/types.d.ts +513 -0
  71. package/dist/types.js +0 -0
  72. package/dist/utils/abort-signals.d.ts +5 -0
  73. package/dist/utils/abort-signals.js +1 -0
  74. package/dist/utils/diagnostics.d.ts +18 -0
  75. package/dist/utils/diagnostics.js +1 -0
  76. package/dist/utils/event-stream.d.ts +20 -0
  77. package/dist/utils/event-stream.js +1 -0
  78. package/dist/utils/hash.d.ts +2 -0
  79. package/dist/utils/hash.js +1 -0
  80. package/dist/utils/headers.d.ts +1 -0
  81. package/dist/utils/headers.js +1 -0
  82. package/dist/utils/json-parse.d.ts +15 -0
  83. package/dist/utils/json-parse.js +2 -0
  84. package/dist/utils/node-http-proxy.d.ts +9 -0
  85. package/dist/utils/node-http-proxy.js +1 -0
  86. package/dist/utils/oauth/anthropic.d.ts +24 -0
  87. package/dist/utils/oauth/anthropic.js +1 -0
  88. package/dist/utils/oauth/device-code.d.ts +20 -0
  89. package/dist/utils/oauth/device-code.js +1 -0
  90. package/dist/utils/oauth/github-copilot.d.ts +29 -0
  91. package/dist/utils/oauth/github-copilot.js +1 -0
  92. package/dist/utils/oauth/index.d.ts +57 -0
  93. package/dist/utils/oauth/index.js +1 -0
  94. package/dist/utils/oauth/oauth-page.d.ts +2 -0
  95. package/dist/utils/oauth/oauth-page.js +74 -0
  96. package/dist/utils/oauth/openai-codex.d.ts +42 -0
  97. package/dist/utils/oauth/openai-codex.js +1 -0
  98. package/dist/utils/oauth/pkce.d.ts +12 -0
  99. package/dist/utils/oauth/pkce.js +1 -0
  100. package/dist/utils/oauth/types.d.ts +63 -0
  101. package/dist/utils/oauth/types.js +0 -0
  102. package/dist/utils/overflow.d.ts +56 -0
  103. package/dist/utils/overflow.js +1 -0
  104. package/dist/utils/sanitize-unicode.d.ts +21 -0
  105. package/dist/utils/sanitize-unicode.js +1 -0
  106. package/dist/utils/typebox-helpers.d.ts +16 -0
  107. package/dist/utils/typebox-helpers.js +1 -0
  108. package/dist/utils/validation.d.ts +17 -0
  109. package/dist/utils/validation.js +6 -0
  110. package/package.json +114 -0
package/package.json ADDED
@@ -0,0 +1,114 @@
1
+ {
2
+ "name": "@openadapter/koda-ai",
3
+ "version": "1.0.0-beta.3",
4
+ "description": "Unified LLM API with automatic model discovery and provider configuration",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./anthropic": {
14
+ "types": "./dist/providers/anthropic.d.ts",
15
+ "import": "./dist/providers/anthropic.js"
16
+ },
17
+ "./azure-openai-responses": {
18
+ "types": "./dist/providers/azure-openai-responses.d.ts",
19
+ "import": "./dist/providers/azure-openai-responses.js"
20
+ },
21
+ "./google": {
22
+ "types": "./dist/providers/google.d.ts",
23
+ "import": "./dist/providers/google.js"
24
+ },
25
+ "./google-vertex": {
26
+ "types": "./dist/providers/google-vertex.d.ts",
27
+ "import": "./dist/providers/google-vertex.js"
28
+ },
29
+ "./mistral": {
30
+ "types": "./dist/providers/mistral.d.ts",
31
+ "import": "./dist/providers/mistral.js"
32
+ },
33
+ "./openai-codex-responses": {
34
+ "types": "./dist/providers/openai-codex-responses.d.ts",
35
+ "import": "./dist/providers/openai-codex-responses.js"
36
+ },
37
+ "./openai-completions": {
38
+ "types": "./dist/providers/openai-completions.d.ts",
39
+ "import": "./dist/providers/openai-completions.js"
40
+ },
41
+ "./openai-responses": {
42
+ "types": "./dist/providers/openai-responses.d.ts",
43
+ "import": "./dist/providers/openai-responses.js"
44
+ },
45
+ "./oauth": {
46
+ "types": "./dist/oauth.d.ts",
47
+ "import": "./dist/oauth.js"
48
+ },
49
+ "./bedrock-provider": {
50
+ "types": "./dist/bedrock-provider.d.ts",
51
+ "import": "./dist/bedrock-provider.js"
52
+ }
53
+ },
54
+ "bin": {
55
+ "pi-ai": "./dist/cli.js"
56
+ },
57
+ "files": [
58
+ "dist",
59
+ "README.md"
60
+ ],
61
+ "scripts": {
62
+ "clean": "shx rm -rf dist",
63
+ "generate-models": "node scripts/generate-models.ts",
64
+ "generate-image-models": "node scripts/generate-image-models.ts",
65
+ "build": "npm run generate-models && npm run generate-image-models && tsgo -p tsconfig.build.json",
66
+ "test": "vitest --run",
67
+ "prepublishOnly": "npm run clean && npm run build",
68
+ "postbuild": "node ../../scripts/minify-pkg-dist.mjs"
69
+ },
70
+ "dependencies": {
71
+ "@anthropic-ai/sdk": "0.91.1",
72
+ "@aws-sdk/client-bedrock-runtime": "3.1048.0",
73
+ "@smithy/node-http-handler": "4.7.3",
74
+ "@google/genai": "1.52.0",
75
+ "@mistralai/mistralai": "2.2.1",
76
+ "http-proxy-agent": "7.0.2",
77
+ "https-proxy-agent": "7.0.6",
78
+ "openai": "6.26.0",
79
+ "partial-json": "0.1.7",
80
+ "typebox": "1.1.38"
81
+ },
82
+ "keywords": [
83
+ "ai",
84
+ "llm",
85
+ "openai",
86
+ "anthropic",
87
+ "gemini",
88
+ "bedrock",
89
+ "unified",
90
+ "api"
91
+ ],
92
+ "author": "OpenAdapter",
93
+ "license": "MIT",
94
+ "repository": {
95
+ "type": "git",
96
+ "url": "git+https://github.com/claraverse-space/koda.git",
97
+ "directory": "packages/ai"
98
+ },
99
+ "engines": {
100
+ "node": ">=22.19.0"
101
+ },
102
+ "devDependencies": {
103
+ "@types/node": "24.12.4",
104
+ "canvas": "3.2.3",
105
+ "vitest": "3.2.4"
106
+ },
107
+ "homepage": "https://openadapter.in",
108
+ "bugs": {
109
+ "url": "https://github.com/claraverse-space/koda/issues"
110
+ },
111
+ "publishConfig": {
112
+ "access": "public"
113
+ }
114
+ }