@saturn-universe/core 0.1.1 → 0.1.2-dev.1
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/dist/contracts.d.ts +1 -0
- package/dist/model-catalog.d.ts +4 -0
- package/dist/model-catalog.js +22 -2
- package/package.json +1 -1
package/dist/contracts.d.ts
CHANGED
|
@@ -1250,6 +1250,7 @@ export interface ProviderProfile {
|
|
|
1250
1250
|
readonly codecId: string;
|
|
1251
1251
|
readonly codecVersion: number;
|
|
1252
1252
|
readonly models: Readonly<Record<string, ModelCapabilities>>;
|
|
1253
|
+
readonly modelRoutes?: Readonly<Record<string, Partial<Pick<ProviderProfile, 'protocol' | 'baseURL'>>>>;
|
|
1253
1254
|
}
|
|
1254
1255
|
export interface ProviderBinding {
|
|
1255
1256
|
readonly profileId: string;
|
package/dist/model-catalog.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ export interface ProviderPreset {
|
|
|
27
27
|
readonly defaultBaseUrl?: string;
|
|
28
28
|
readonly defaultProtocol: ProviderProtocol;
|
|
29
29
|
readonly defaultEnvKey: string;
|
|
30
|
+
readonly openCodeModelsUrl?: string;
|
|
30
31
|
}
|
|
32
|
+
export declare const openCodeClientHeaders: {
|
|
33
|
+
readonly 'x-opencode-client': "saturn";
|
|
34
|
+
};
|
|
31
35
|
export declare const providerPresets: readonly ProviderPreset[];
|
|
32
36
|
export declare function normalizeProviderBaseUrl(value: string): string | undefined;
|
package/dist/model-catalog.js
CHANGED
|
@@ -112,6 +112,7 @@ export const providerIdPattern = /^[A-Za-z0-9]+(?:[-_][A-Za-z0-9]+)*$/;
|
|
|
112
112
|
export function providerCredentialKey(id) {
|
|
113
113
|
return `SATURN_PROVIDER_${id.toUpperCase().replaceAll('-', '_')}_API_KEY`;
|
|
114
114
|
}
|
|
115
|
+
export const openCodeClientHeaders = { 'x-opencode-client': 'saturn' };
|
|
115
116
|
export const providerPresets = [
|
|
116
117
|
{
|
|
117
118
|
id: 'openai',
|
|
@@ -143,8 +144,27 @@ export const providerPresets = [
|
|
|
143
144
|
defaultBaseUrl: 'https://openrouter.ai/api/v1',
|
|
144
145
|
defaultProtocol: 'openai-responses',
|
|
145
146
|
},
|
|
146
|
-
{
|
|
147
|
-
|
|
147
|
+
{
|
|
148
|
+
id: 'opencode-go',
|
|
149
|
+
label: 'OpenCode Go Subscription',
|
|
150
|
+
defaultBaseUrl: 'https://opencode.ai/inference/go/openai/v1',
|
|
151
|
+
defaultProtocol: 'openai-chat',
|
|
152
|
+
defaultEnvKey: 'OPENCODE_API_KEY',
|
|
153
|
+
openCodeModelsUrl: 'https://opencode.ai/zen/go/v1/models',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'opencode-zen',
|
|
157
|
+
label: 'OpenCode Zen',
|
|
158
|
+
defaultBaseUrl: 'https://opencode.ai/inference/openai/v1',
|
|
159
|
+
defaultProtocol: 'openai-chat',
|
|
160
|
+
defaultEnvKey: 'OPENCODE_API_KEY',
|
|
161
|
+
openCodeModelsUrl: 'https://opencode.ai/zen/v1/models',
|
|
162
|
+
},
|
|
163
|
+
{ id: 'custom', label: 'Custom', defaultProtocol: 'openai-chat' },
|
|
164
|
+
].map((preset) => ({
|
|
165
|
+
...preset,
|
|
166
|
+
defaultEnvKey: 'defaultEnvKey' in preset ? preset.defaultEnvKey : providerCredentialKey(preset.id),
|
|
167
|
+
}));
|
|
148
168
|
export function normalizeProviderBaseUrl(value) {
|
|
149
169
|
try {
|
|
150
170
|
const url = new URL(value);
|