@cpajs/cpa 0.0.0-stage → 0.0.1-alpha-2
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/LICENSE +21 -0
- package/README.md +142 -2
- package/dist/client/errors.d.ts +70 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +91 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/index.d.ts +46 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +65 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/resources/config.d.ts +61 -0
- package/dist/client/resources/config.d.ts.map +1 -0
- package/dist/client/resources/config.js +80 -0
- package/dist/client/resources/config.js.map +1 -0
- package/dist/client/resources/credentials.d.ts +64 -0
- package/dist/client/resources/credentials.d.ts.map +1 -0
- package/dist/client/resources/credentials.js +94 -0
- package/dist/client/resources/credentials.js.map +1 -0
- package/dist/client/resources/download.d.ts +8 -0
- package/dist/client/resources/download.d.ts.map +1 -0
- package/dist/client/resources/download.js +17 -0
- package/dist/client/resources/download.js.map +1 -0
- package/dist/client/resources/logs.d.ts +23 -0
- package/dist/client/resources/logs.d.ts.map +1 -0
- package/dist/client/resources/logs.js +37 -0
- package/dist/client/resources/logs.js.map +1 -0
- package/dist/client/resources/oauth.d.ts +43 -0
- package/dist/client/resources/oauth.d.ts.map +1 -0
- package/dist/client/resources/oauth.js +70 -0
- package/dist/client/resources/oauth.js.map +1 -0
- package/dist/client/resources/plugins.d.ts +25 -0
- package/dist/client/resources/plugins.d.ts.map +1 -0
- package/dist/client/resources/plugins.js +47 -0
- package/dist/client/resources/plugins.js.map +1 -0
- package/dist/client/resources/requests.d.ts +14 -0
- package/dist/client/resources/requests.d.ts.map +1 -0
- package/dist/client/resources/requests.js +16 -0
- package/dist/client/resources/requests.js.map +1 -0
- package/dist/client/resources/routing.d.ts +12 -0
- package/dist/client/resources/routing.d.ts.map +1 -0
- package/dist/client/resources/routing.js +20 -0
- package/dist/client/resources/routing.js.map +1 -0
- package/dist/client/resources/server.d.ts +17 -0
- package/dist/client/resources/server.d.ts.map +1 -0
- package/dist/client/resources/server.js +49 -0
- package/dist/client/resources/server.js.map +1 -0
- package/dist/client/resources/usage.d.ts +16 -0
- package/dist/client/resources/usage.d.ts.map +1 -0
- package/dist/client/resources/usage.js +20 -0
- package/dist/client/resources/usage.js.map +1 -0
- package/dist/client/transport.d.ts +60 -0
- package/dist/client/transport.d.ts.map +1 -0
- package/dist/client/transport.js +170 -0
- package/dist/client/transport.js.map +1 -0
- package/dist/client/types/common.d.ts +38 -0
- package/dist/client/types/common.d.ts.map +1 -0
- package/dist/client/types/common.js +4 -0
- package/dist/client/types/common.js.map +1 -0
- package/dist/client/types/config.d.ts +407 -0
- package/dist/client/types/config.d.ts.map +1 -0
- package/dist/client/types/config.js +9 -0
- package/dist/client/types/config.js.map +1 -0
- package/dist/client/types/credentials.d.ts +240 -0
- package/dist/client/types/credentials.d.ts.map +1 -0
- package/dist/client/types/credentials.js +4 -0
- package/dist/client/types/credentials.js.map +1 -0
- package/dist/client/types/index.d.ts +10 -0
- package/dist/client/types/index.d.ts.map +1 -0
- package/dist/client/types/index.js +2 -0
- package/dist/client/types/index.js.map +1 -0
- package/dist/client/types/oauth.d.ts +89 -0
- package/dist/client/types/oauth.d.ts.map +1 -0
- package/dist/client/types/oauth.js +4 -0
- package/dist/client/types/oauth.js.map +1 -0
- package/dist/client/types/observability.d.ts +111 -0
- package/dist/client/types/observability.d.ts.map +1 -0
- package/dist/client/types/observability.js +4 -0
- package/dist/client/types/observability.js.map +1 -0
- package/dist/client/types/plugins.d.ts +171 -0
- package/dist/client/types/plugins.d.ts.map +1 -0
- package/dist/client/types/plugins.js +4 -0
- package/dist/client/types/plugins.js.map +1 -0
- package/dist/client/types/requests.d.ts +16 -0
- package/dist/client/types/requests.d.ts.map +1 -0
- package/dist/client/types/requests.js +4 -0
- package/dist/client/types/requests.js.map +1 -0
- package/dist/client/types/routing.d.ts +50 -0
- package/dist/client/types/routing.d.ts.map +1 -0
- package/dist/client/types/routing.js +4 -0
- package/dist/client/types/routing.js.map +1 -0
- package/dist/client/types/server.d.ts +15 -0
- package/dist/client/types/server.d.ts.map +1 -0
- package/dist/client/types/server.js +4 -0
- package/dist/client/types/server.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/server/binary.d.ts +35 -0
- package/dist/server/binary.d.ts.map +1 -0
- package/dist/server/binary.js +108 -0
- package/dist/server/binary.js.map +1 -0
- package/dist/server/config.d.ts +37 -0
- package/dist/server/config.d.ts.map +1 -0
- package/dist/server/config.js +103 -0
- package/dist/server/config.js.map +1 -0
- package/dist/server/cpa-version.d.ts +12 -0
- package/dist/server/cpa-version.d.ts.map +1 -0
- package/dist/server/cpa-version.js +12 -0
- package/dist/server/cpa-version.js.map +1 -0
- package/dist/server/errors.d.ts +36 -0
- package/dist/server/errors.d.ts.map +1 -0
- package/dist/server/errors.js +26 -0
- package/dist/server/errors.js.map +1 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +208 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/process.d.ts +27 -0
- package/dist/server/process.d.ts.map +1 -0
- package/dist/server/process.js +114 -0
- package/dist/server/process.js.map +1 -0
- package/dist/server/readiness.d.ts +13 -0
- package/dist/server/readiness.d.ts.map +1 -0
- package/dist/server/readiness.js +56 -0
- package/dist/server/readiness.js.map +1 -0
- package/dist/server/redact.d.ts +3 -0
- package/dist/server/redact.d.ts.map +1 -0
- package/dist/server/redact.js +16 -0
- package/dist/server/redact.js.map +1 -0
- package/dist/server/targets.d.ts +48 -0
- package/dist/server/targets.d.ts.map +1 -0
- package/dist/server/targets.js +90 -0
- package/dist/server/targets.js.map +1 -0
- package/dist/server/types.d.ts +87 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +2 -0
- package/dist/server/types.js.map +1 -0
- package/package.json +83 -4
- package/src/client/errors.ts +104 -0
- package/src/client/index.ts +95 -0
- package/src/client/resources/config.ts +124 -0
- package/src/client/resources/credentials.ts +133 -0
- package/src/client/resources/download.ts +21 -0
- package/src/client/resources/logs.ts +46 -0
- package/src/client/resources/oauth.ts +105 -0
- package/src/client/resources/plugins.ts +70 -0
- package/src/client/resources/requests.ts +20 -0
- package/src/client/resources/routing.ts +29 -0
- package/src/client/resources/server.ts +52 -0
- package/src/client/resources/usage.ts +27 -0
- package/src/client/transport.ts +215 -0
- package/src/client/types/common.ts +38 -0
- package/src/client/types/config.ts +248 -0
- package/src/client/types/credentials.ts +195 -0
- package/src/client/types/index.ts +9 -0
- package/src/client/types/oauth.ts +71 -0
- package/src/client/types/observability.ts +93 -0
- package/src/client/types/plugins.ts +136 -0
- package/src/client/types/requests.ts +19 -0
- package/src/client/types/routing.ts +44 -0
- package/src/client/types/server.ts +18 -0
- package/src/index.ts +2 -0
- package/src/server/binary.ts +128 -0
- package/src/server/config.ts +128 -0
- package/src/server/cpa-version.ts +11 -0
- package/src/server/errors.ts +48 -0
- package/src/server/index.ts +236 -0
- package/src/server/process.ts +124 -0
- package/src/server/readiness.ts +58 -0
- package/src/server/redact.ts +14 -0
- package/src/server/targets.ts +133 -0
- package/src/server/types.ts +93 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
// Types for the CLIProxyAPI v8 configuration document, as read and written by
|
|
2
|
+
// `/v8/management/config`. Keys are the native dash-case YAML keys.
|
|
3
|
+
//
|
|
4
|
+
// All fields are optional: GET returns only what is stored, without defaults.
|
|
5
|
+
// `null` may appear wherever a value was explicitly set to null (PATCH keeps
|
|
6
|
+
// nulls; on per-key overrides null means "inherit from the group").
|
|
7
|
+
// Derived from CLIProxyAPI v8.0.43 internal/config; see docs/api-coverage.md.
|
|
8
|
+
|
|
9
|
+
/** Duration string ("30s", "1h") – some fields also accept integer seconds. */
|
|
10
|
+
export type CpaDuration = string | number;
|
|
11
|
+
|
|
12
|
+
export interface CpaThinkingSupport { // registry/model_registry.go:144
|
|
13
|
+
min?: number; max?: number;
|
|
14
|
+
"zero-allowed"?: boolean; "dynamic-allowed"?: boolean;
|
|
15
|
+
"disable-type"?: string; levels?: string[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CpaRequestScopedErrorRule { // config_types.go:16
|
|
19
|
+
status?: number; match?: string[]; "match-regexr"?: string[];
|
|
20
|
+
action?: "stop" | "stop-and-cooldown" | "continue" | "continue-and-cooldown" | (string & {});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CpaModelBase {
|
|
24
|
+
name: string; alias: string; "display-name"?: string; "force-mapping"?: boolean;
|
|
25
|
+
thinking?: CpaThinkingSupport | null;
|
|
26
|
+
}
|
|
27
|
+
export interface CpaGeminiModel extends CpaModelBase { "max-context-length"?: number; "is-compat"?: boolean } // :885
|
|
28
|
+
export interface CpaClaudeModel extends CpaGeminiModel {} // :678
|
|
29
|
+
export interface CpaCodexModel extends CpaGeminiModel { "support-configuration-update"?: boolean } // :778
|
|
30
|
+
export interface CpaVertexModel extends CpaModelBase { openapi?: boolean } // vertex_compat.go:77
|
|
31
|
+
export interface CpaOpenAICompatModel extends CpaGeminiModel { // :978
|
|
32
|
+
image?: boolean; "input-modalities"?: string[]; "output-modalities"?: string[]; "use-max-completion-tokens"?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Fields shared by a group and (as overrides; null = inherit) by each key. C:353-357 */
|
|
36
|
+
export interface CpaKeyShared<M> {
|
|
37
|
+
priority?: number | null; prefix?: string | null; "proxy-url"?: string | null;
|
|
38
|
+
headers?: Record<string, string> | null; models?: M[] | null; "excluded-models"?: string[] | null;
|
|
39
|
+
"disable-cooling"?: boolean | null; "request-retry"?: number | null;
|
|
40
|
+
"request-scoped-errors"?: CpaRequestScopedErrorRule[] | null;
|
|
41
|
+
}
|
|
42
|
+
export interface CpaKeyBase<M> extends CpaKeyShared<M> {
|
|
43
|
+
"api-key": string;
|
|
44
|
+
weight?: number | null; // weighted-round-robin share, max 1_000_000
|
|
45
|
+
/** Injected by GET JSON only; stripped on write. */
|
|
46
|
+
readonly auth_index?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface CpaGeminiKey extends CpaKeyBase<CpaGeminiModel> {} // GeminiKey :834
|
|
49
|
+
export interface CpaVertexKey extends Omit<CpaKeyBase<CpaVertexModel>, "request-scoped-errors"> { // vertex_compat.go:15
|
|
50
|
+
interactions?: boolean | null; openapi?: boolean | null; "openapi-location"?: string | null;
|
|
51
|
+
}
|
|
52
|
+
export interface CpaCodexKey extends CpaKeyBase<CpaCodexModel> { // CodexKey :716 (xai, meta alias it)
|
|
53
|
+
websockets?: boolean | null; "alpha-search"?: boolean | null; "disable-codex-cloaking"?: boolean | null;
|
|
54
|
+
}
|
|
55
|
+
export interface CpaClaudeCloak { // :572
|
|
56
|
+
mode?: string; "strict-mode"?: boolean; "sensitive-words"?: string[]; "cache-user-id"?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface CpaClaudeKey extends CpaKeyBase<CpaClaudeModel> { // :596
|
|
59
|
+
"rebuild-mid-system-message"?: boolean | null; "native-tool-search"?: boolean | null;
|
|
60
|
+
cloak?: CpaClaudeCloak | null; "fingerprint-profile"?: string | null; "experimental-cch-signing"?: boolean | null;
|
|
61
|
+
}
|
|
62
|
+
export interface CpaKeyGroup<K, M> extends CpaKeyShared<M> {
|
|
63
|
+
name?: string; "base-url"?: string; keys: K[];
|
|
64
|
+
}
|
|
65
|
+
export interface CpaOpenAICompatKey { // :964
|
|
66
|
+
"api-key": string; weight?: number | null; "proxy-url"?: string; readonly auth_index?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface CpaOpenAICompatGroup { // :922 (keys replaces api-key-entries)
|
|
69
|
+
name: string; priority?: number; disabled?: boolean; prefix?: string; "base-url": string;
|
|
70
|
+
keys?: CpaOpenAICompatKey[]; models?: CpaOpenAICompatModel[]; headers?: Record<string, string>;
|
|
71
|
+
"support-prompt-cache-key"?: boolean; "disable-cooling"?: boolean | null; "request-retry"?: number | null;
|
|
72
|
+
"request-scoped-errors"?: CpaRequestScopedErrorRule[];
|
|
73
|
+
/** Injected on the group by GET JSON when it has no keys. */
|
|
74
|
+
readonly auth_index?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface CpaPayloadModelRule { // :551
|
|
78
|
+
name?: string; protocol?: string; headers?: Record<string, string>; "from-protocol"?: string;
|
|
79
|
+
match?: Record<string, unknown>[]; "not-match"?: Record<string, unknown>[]; exist?: string[]; "not-exist"?: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface CpaPayloadRule { models?: CpaPayloadModelRule[]; params?: Record<string, unknown> } // :542
|
|
82
|
+
export interface CpaPayloadFilterRule { models?: CpaPayloadModelRule[]; params?: string[] } // :534
|
|
83
|
+
|
|
84
|
+
export interface CpaOAuthModelAlias { // :455
|
|
85
|
+
name: string; alias: string; openapi?: boolean; fork?: boolean; "display-name"?: string; "force-mapping"?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface CpaOAuthModelSetting { name: string; alias?: string; openapi?: boolean; "max-context-length"?: number } // :470
|
|
88
|
+
|
|
89
|
+
export interface CpaICEServer { // :329
|
|
90
|
+
urls: string[];
|
|
91
|
+
/** Redacted (absent) in GET JSON; omit on write to keep the stored value; "" or null clears it. */
|
|
92
|
+
username?: string | null; credential?: string | null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface CpaClaudeHeaderDefaults { // :162
|
|
96
|
+
"user-agent"?: string; "package-version"?: string; "runtime-version"?: string; os?: string; arch?: string;
|
|
97
|
+
timeout?: string; timezone?: string; "stabilize-device-profile"?: boolean;
|
|
98
|
+
"anthropic-beta-strip"?: string[]; "anthropic-beta-append"?: string[];
|
|
99
|
+
"inject-diagnostics"?: boolean; "client-request-id"?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface CpaPluginStoreAuth { // internal/pluginstore/auth.go:27
|
|
103
|
+
match?: string; "apply-to"?: string[]; type?: string; "token-env"?: string; "username-env"?: string;
|
|
104
|
+
"password-env"?: string; "header-name"?: string; "header-value-env"?: string; "allow-insecure"?: boolean;
|
|
105
|
+
}
|
|
106
|
+
export interface CpaPluginInstanceConfig { enabled?: boolean; priority?: number; [option: string]: unknown } // :44
|
|
107
|
+
|
|
108
|
+
export interface CpaConfig {
|
|
109
|
+
"config-version"?: 8;
|
|
110
|
+
|
|
111
|
+
models?: { catalog?: string; "codex-catalog"?: string; "devin-catalog"?: string }; // registry/catalog_config.go:11
|
|
112
|
+
|
|
113
|
+
server?: {
|
|
114
|
+
host?: string; port?: number; "max-request-body-bytes"?: number; "github-token"?: string;
|
|
115
|
+
"trusted-proxies"?: string[]; // IP/CIDR, validated (422)
|
|
116
|
+
tls?: { enable?: boolean; cert?: string; key?: string }; // :336
|
|
117
|
+
"commercial-mode"?: boolean;
|
|
118
|
+
discovery?: { // :360
|
|
119
|
+
enabled?: boolean; "service-name"?: string; "service-type"?: string; subtypes?: string[];
|
|
120
|
+
interfaces?: { include?: string[]; exclude?: string[] };
|
|
121
|
+
"auth-required"?: boolean | null; "advertise-management"?: boolean;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
management?: { // RemoteManagement :384
|
|
126
|
+
"allow-remote"?: boolean;
|
|
127
|
+
/** NOT redacted by GET. Plaintext on write; persisted as bcrypt hash after watcher reload. */
|
|
128
|
+
"secret-key"?: string;
|
|
129
|
+
"disable-control-panel"?: boolean; "disable-auto-update-panel"?: boolean;
|
|
130
|
+
"panel-github-repository"?: string; "base-url"?: string;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
access?: { "api-keys"?: string[] };
|
|
134
|
+
|
|
135
|
+
credentials?: {
|
|
136
|
+
concurrency?: { // credential_concurrency.go:23
|
|
137
|
+
/** read-only (400 read_only_field) */ readonly "lifecycle-config-revision"?: number;
|
|
138
|
+
/** read-only */ readonly "observation-barrier-revision"?: number;
|
|
139
|
+
"cpa-heartbeat-timeout"?: CpaDuration; "cpa-cancel-bound"?: CpaDuration; "reclaim-grace"?: CpaDuration;
|
|
140
|
+
"cleanup-interval"?: CpaDuration; "release-flush-interval"?: CpaDuration; "release-max-backoff"?: CpaDuration;
|
|
141
|
+
"busy-retry-min"?: CpaDuration; "busy-retry-max"?: CpaDuration; "max-limit"?: number;
|
|
142
|
+
};
|
|
143
|
+
"in-flight"?: { // credential_in_flight.go:18
|
|
144
|
+
"snapshot-interval"?: string; "stale-after"?: string; "max-part-bytes"?: number; "max-part-count"?: number;
|
|
145
|
+
"max-revision-bytes"?: number; "max-aggregate-groups"?: number; "max-details"?: number;
|
|
146
|
+
"max-string-bytes"?: number; "staging-retention"?: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
routing?: { // RoutingConfig :417 + remaps
|
|
151
|
+
strategy?: "round-robin" | "weighted-round-robin" | "fill-first" | (string & {});
|
|
152
|
+
"session-affinity"?: boolean; "session-affinity-ttl"?: string; "session-affinity-subagents"?: boolean;
|
|
153
|
+
"session-affinity-rebind-on"?: string;
|
|
154
|
+
"force-model-prefix"?: boolean;
|
|
155
|
+
retry?: { "request-retry"?: number; "max-retry-credentials"?: number; "max-retry-interval"?: number };
|
|
156
|
+
cooldown?: { "disable-cooling"?: boolean; "save-cooldown-status"?: boolean; "transient-error-cooldown-seconds"?: number };
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
requests?: {
|
|
160
|
+
"proxy-url"?: string; "tls-handshake-timeout-seconds"?: number; "passthrough-headers"?: boolean;
|
|
161
|
+
"nonstream-keepalive-interval"?: number;
|
|
162
|
+
streaming?: { "keepalive-seconds"?: number; "bootstrap-retries"?: number; "send-keepalive-before-ft"?: boolean }; // sdk_config.go:353
|
|
163
|
+
payload?: { // :520
|
|
164
|
+
default?: CpaPayloadRule[]; "default-raw"?: CpaPayloadRule[];
|
|
165
|
+
override?: CpaPayloadRule[]; "override-raw"?: CpaPayloadRule[]; filter?: CpaPayloadFilterRule[];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
client?: { // sdk_config.go:123
|
|
170
|
+
codex?: {
|
|
171
|
+
"optimize-multi-agent-v2"?: boolean; "enable-apply-patch"?: boolean;
|
|
172
|
+
"web-search-result-cache"?: { enabled?: boolean; ttl?: string | number; limit?: number } | null;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
upstream?: {
|
|
177
|
+
codex?: { // CodexConfig :230 (subset)
|
|
178
|
+
"disable-codex-cloaking"?: boolean; "stream-bootstrap-buffering"?: boolean;
|
|
179
|
+
"stream-bootstrap-timeout"?: string; "orphan-delegation-compatibility"?: boolean;
|
|
180
|
+
"model-level-cooling"?: boolean; "response-steering"?: boolean;
|
|
181
|
+
};
|
|
182
|
+
claude?: { // ClaudeConfig :115 + ClaudeCodeConfig + remaps
|
|
183
|
+
"model-level-cooling"?: boolean; "tool-search"?: boolean; "session-date-pin-days"?: number | null;
|
|
184
|
+
"disable-claude-cloak-mode"?: boolean; "disable-cloaking-model-list"?: boolean;
|
|
185
|
+
"header-defaults"?: CpaClaudeHeaderDefaults;
|
|
186
|
+
};
|
|
187
|
+
xai?: { "inject-x-search"?: boolean }; // :194
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
"api-keys"?: {
|
|
191
|
+
gemini?: CpaKeyGroup<CpaGeminiKey, CpaGeminiModel>[];
|
|
192
|
+
interactions?: CpaKeyGroup<CpaGeminiKey, CpaGeminiModel>[];
|
|
193
|
+
vertex?: CpaKeyGroup<CpaVertexKey, CpaVertexModel>[];
|
|
194
|
+
codex?: CpaKeyGroup<CpaCodexKey, CpaCodexModel>[];
|
|
195
|
+
claude?: CpaKeyGroup<CpaClaudeKey, CpaClaudeModel>[];
|
|
196
|
+
xai?: CpaKeyGroup<CpaCodexKey, CpaCodexModel>[];
|
|
197
|
+
meta?: CpaKeyGroup<CpaCodexKey, CpaCodexModel>[];
|
|
198
|
+
"openai-compatibility"?: CpaOpenAICompatGroup[];
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
oauth?: {
|
|
202
|
+
"auth-dir"?: string; "auth-auto-refresh-workers"?: number;
|
|
203
|
+
/** keyed by channel: vertex, aistudio, antigravity, claude, codex, kimi, xai, meta, or plugin provider keys */
|
|
204
|
+
"model-alias"?: Record<string, CpaOAuthModelAlias[]>;
|
|
205
|
+
"excluded-models"?: Record<string, string[]>;
|
|
206
|
+
"request-scoped-errors"?: Record<string, CpaRequestScopedErrorRule[]>;
|
|
207
|
+
settings?: Record<string, CpaOAuthModelSetting[]>;
|
|
208
|
+
providers?: {
|
|
209
|
+
aistudio?: { "ws-auth"?: boolean };
|
|
210
|
+
codex?: {
|
|
211
|
+
"live-media-relay"?: { // :318
|
|
212
|
+
enabled?: boolean; "max-sessions"?: number; "disable-private-remote-ips"?: boolean;
|
|
213
|
+
"public-ip"?: string; "udp-port-min"?: number; "udp-port-max"?: number;
|
|
214
|
+
"ice-servers"?: CpaICEServer[];
|
|
215
|
+
};
|
|
216
|
+
"signin-with-chatgpt-identifier"?: string;
|
|
217
|
+
"header-defaults"?: { "user-agent"?: string; "beta-features"?: string }; // :188
|
|
218
|
+
};
|
|
219
|
+
antigravity?: { // :206 + remaps
|
|
220
|
+
"sensitive-words"?: string[];
|
|
221
|
+
"connection-pool"?: { enabled?: boolean; "idle-conn-timeout"?: string; "max-idle-conns-per-host"?: number };
|
|
222
|
+
"antigravity-credits"?: boolean;
|
|
223
|
+
"signature-cache-enabled"?: boolean; "signature-bypass-strict"?: boolean;
|
|
224
|
+
};
|
|
225
|
+
devin?: { "sensitive-words"?: string[] };
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
multimedia?: {
|
|
230
|
+
"disable-image-generation"?: boolean | "chat" | "passthrough";
|
|
231
|
+
"gpt-image-2-base-model"?: string; "video-result-auth-cache-ttl"?: string;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
observability?: {
|
|
235
|
+
logs?: { debug?: boolean; "logging-to-file"?: boolean; "logs-max-total-size-mb"?: number;
|
|
236
|
+
"error-logs-max-files"?: number; "request-log"?: boolean };
|
|
237
|
+
usage?: { "usage-statistics-enabled"?: boolean; "redis-usage-queue-retention-seconds"?: number };
|
|
238
|
+
pprof?: { enable?: boolean; addr?: string };
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
plugins?: { // :28
|
|
242
|
+
enabled?: boolean; dir?: string; "store-sources"?: string[]; "store-auth"?: CpaPluginStoreAuth[];
|
|
243
|
+
/** read-only */ readonly "auth-revision"?: number;
|
|
244
|
+
configs?: Record<string, CpaPluginInstanceConfig>;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
"quota-exceeded"?: { "switch-project"?: boolean; "switch-preview-model"?: boolean }; // :403 (antigravity-credits moved)
|
|
248
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// Types for /v8/management/credentials.
|
|
2
|
+
// Derived from CLIProxyAPI v8.0.43; see docs/api-coverage.md.
|
|
3
|
+
|
|
4
|
+
import type { AuthStatus, CooldownReason, OkStatus, PartialFailure, RecentRequestBucket, SIWCStatus } from './common.ts';
|
|
5
|
+
|
|
6
|
+
// ---------- GET /credentials ----------
|
|
7
|
+
export interface ListCredentialsQuery {
|
|
8
|
+
name?: string;
|
|
9
|
+
auth_index?: string;
|
|
10
|
+
page?: number; // >= 1; presence of page or page_size enables pagination
|
|
11
|
+
page_size?: number; // >= 1, default 50
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface QuotaObservation {
|
|
15
|
+
observed_at?: string;
|
|
16
|
+
signals: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CooldownView {
|
|
20
|
+
scope: 'credential' | 'model';
|
|
21
|
+
model_key?: string;
|
|
22
|
+
reason: CooldownReason | (string & {});
|
|
23
|
+
retry_at: string;
|
|
24
|
+
remaining_seconds: number;
|
|
25
|
+
backoff_level?: number;
|
|
26
|
+
http_status?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CodexIdTokenClaims {
|
|
30
|
+
chatgpt_account_id?: string;
|
|
31
|
+
plan_type?: string;
|
|
32
|
+
chatgpt_subscription_active_start?: unknown;
|
|
33
|
+
chatgpt_subscription_active_until?: unknown;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface AuthFileEntry {
|
|
37
|
+
id: string;
|
|
38
|
+
auth_index: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
provider: string;
|
|
42
|
+
label: string;
|
|
43
|
+
status: AuthStatus;
|
|
44
|
+
status_message: string;
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
unavailable: boolean;
|
|
47
|
+
runtime_only: boolean;
|
|
48
|
+
source: 'file' | 'memory';
|
|
49
|
+
size: number;
|
|
50
|
+
success: number;
|
|
51
|
+
failed: number;
|
|
52
|
+
recent_requests: RecentRequestBucket[];
|
|
53
|
+
quota: QuotaObservation;
|
|
54
|
+
cooldowns: CooldownView[] | null;
|
|
55
|
+
|
|
56
|
+
model_quotas?: Record<string, QuotaObservation>;
|
|
57
|
+
supports_quota?: true;
|
|
58
|
+
quota_provider?: string;
|
|
59
|
+
quota_plugin_id?: string;
|
|
60
|
+
email?: string;
|
|
61
|
+
project_id?: string;
|
|
62
|
+
account_type?: 'oauth' | 'api_key';
|
|
63
|
+
account?: string;
|
|
64
|
+
created_at?: string;
|
|
65
|
+
modtime?: string;
|
|
66
|
+
updated_at?: string;
|
|
67
|
+
last_refresh?: string;
|
|
68
|
+
next_retry_after?: string;
|
|
69
|
+
path?: string;
|
|
70
|
+
id_token?: CodexIdTokenClaims;
|
|
71
|
+
priority?: number;
|
|
72
|
+
note?: string;
|
|
73
|
+
weight?: number;
|
|
74
|
+
websockets?: boolean;
|
|
75
|
+
request_retry?: number;
|
|
76
|
+
// codex only (v8)
|
|
77
|
+
siwc_bind_supported?: boolean;
|
|
78
|
+
use_siwc?: boolean;
|
|
79
|
+
siwc_status?: SIWCStatus;
|
|
80
|
+
siwc_bound?: boolean;
|
|
81
|
+
siwc_expires_at?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ListCredentialsResponse {
|
|
85
|
+
observed_at: string;
|
|
86
|
+
files: AuthFileEntry[];
|
|
87
|
+
total?: number;
|
|
88
|
+
page?: number;
|
|
89
|
+
page_size?: number;
|
|
90
|
+
has_more?: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ---------- POST /credentials ----------
|
|
94
|
+
// multipart: any field names, one or more .json files; or raw JSON body + ?name=<file>.json
|
|
95
|
+
export interface UploadCredentialRawQuery { name: string }
|
|
96
|
+
export type UploadCredentialsResponse =
|
|
97
|
+
| { status: 'ok' } // single file / raw
|
|
98
|
+
| { status: 'ok'; uploaded: number; files: string[] } // multi, 200
|
|
99
|
+
| { status: 'partial'; uploaded: number; files: string[]; failed: PartialFailure[] }; // 207
|
|
100
|
+
|
|
101
|
+
// ---------- DELETE /credentials ----------
|
|
102
|
+
export interface DeleteCredentialsQuery { name?: string | string[]; all?: 'true' | '1' | '*' }
|
|
103
|
+
export type DeleteCredentialsBody = string[] | { name?: string; names?: string[] };
|
|
104
|
+
export type DeleteCredentialsResponse =
|
|
105
|
+
| { status: 'ok' } // single
|
|
106
|
+
| { status: 'ok'; deleted: number } // all=true
|
|
107
|
+
| { status: 'ok'; deleted: number; files: string[] } // multi, 200
|
|
108
|
+
| { status: 'partial'; deleted: number; files: string[]; failed: PartialFailure[] }; // 207
|
|
109
|
+
|
|
110
|
+
// ---------- GET /credentials/models ----------
|
|
111
|
+
export interface CredentialModelsQuery { name: string }
|
|
112
|
+
export interface CredentialModel { id: string; display_name?: string; type?: string; owned_by?: string }
|
|
113
|
+
export interface CredentialModelsResponse { models: CredentialModel[] }
|
|
114
|
+
|
|
115
|
+
// ---------- GET /credentials/download ----------
|
|
116
|
+
export interface DownloadCredentialQuery { name: string } // must end with .json
|
|
117
|
+
// response: raw credential JSON (Record<string, unknown>)
|
|
118
|
+
|
|
119
|
+
// ---------- PATCH /credentials/status ----------
|
|
120
|
+
export interface PatchCredentialStatusRequest { name: string; auth_index?: string; disabled: boolean }
|
|
121
|
+
export type PatchCredentialStatusResponse =
|
|
122
|
+
| { status: 'ok'; disabled: boolean }
|
|
123
|
+
| { status: 'ok'; disabled: boolean; via: 'config:excluded-models'; excluded_pattern: string };
|
|
124
|
+
|
|
125
|
+
// ---------- PATCH /credentials/fields ----------
|
|
126
|
+
export interface PatchCredentialFieldsRequest {
|
|
127
|
+
name: string;
|
|
128
|
+
priority?: number | null;
|
|
129
|
+
note?: string | null;
|
|
130
|
+
weight?: number | null;
|
|
131
|
+
request_retry?: number | null;
|
|
132
|
+
websockets?: boolean | null;
|
|
133
|
+
disabled?: boolean | null;
|
|
134
|
+
prefix?: string | null;
|
|
135
|
+
proxy_url?: string | null;
|
|
136
|
+
headers?: Record<string, string> | null; // merged; "" deletes a header
|
|
137
|
+
excluded_models?: string[] | null;
|
|
138
|
+
[fieldPath: string]: unknown; // arbitrary metadata, dotted paths allowed
|
|
139
|
+
}
|
|
140
|
+
export type PatchCredentialFieldsResponse = OkStatus;
|
|
141
|
+
|
|
142
|
+
// ---------- POST /credentials/refresh ----------
|
|
143
|
+
export interface RefreshCredentialsQuery { all?: 'true'; name?: string; auth_index?: string }
|
|
144
|
+
export interface RefreshCredentialsRequest { name?: string; auth_index?: string; all?: boolean }
|
|
145
|
+
export interface ForceRefreshResult { id: string; success: boolean; error?: string }
|
|
146
|
+
|
|
147
|
+
export interface CoreAuthQuotaState {
|
|
148
|
+
exceeded: boolean;
|
|
149
|
+
reason?: string;
|
|
150
|
+
next_recover_at: string;
|
|
151
|
+
backoff_level?: number;
|
|
152
|
+
observed_at?: string;
|
|
153
|
+
signals?: Record<string, string>;
|
|
154
|
+
}
|
|
155
|
+
export interface CoreAuthError { code?: string; message: string; retryable: boolean; http_status?: number }
|
|
156
|
+
export interface CoreModelState {
|
|
157
|
+
status: AuthStatus;
|
|
158
|
+
status_message?: string;
|
|
159
|
+
unavailable: boolean;
|
|
160
|
+
next_retry_after: string;
|
|
161
|
+
last_error?: CoreAuthError;
|
|
162
|
+
quota: CoreAuthQuotaState;
|
|
163
|
+
updated_at: string;
|
|
164
|
+
}
|
|
165
|
+
export interface CoreAuth {
|
|
166
|
+
id: string;
|
|
167
|
+
registration_epoch?: number;
|
|
168
|
+
credential_version?: number;
|
|
169
|
+
generation?: number;
|
|
170
|
+
provider: string;
|
|
171
|
+
prefix?: string;
|
|
172
|
+
label?: string;
|
|
173
|
+
status: AuthStatus;
|
|
174
|
+
status_message?: string;
|
|
175
|
+
disabled: boolean;
|
|
176
|
+
unavailable: boolean;
|
|
177
|
+
proxy_url?: string;
|
|
178
|
+
attributes?: Record<string, string>;
|
|
179
|
+
metadata?: Record<string, unknown>; // contains raw tokens
|
|
180
|
+
quota: CoreAuthQuotaState;
|
|
181
|
+
last_error?: CoreAuthError;
|
|
182
|
+
created_at: string;
|
|
183
|
+
updated_at: string;
|
|
184
|
+
last_refreshed_at: string;
|
|
185
|
+
next_refresh_after: string;
|
|
186
|
+
next_retry_after: string;
|
|
187
|
+
model_states?: Record<string, CoreModelState>;
|
|
188
|
+
}
|
|
189
|
+
export type RefreshCredentialsResponse =
|
|
190
|
+
| { ok: true; results: ForceRefreshResult[] }
|
|
191
|
+
| { ok: true; auth: CoreAuth };
|
|
192
|
+
|
|
193
|
+
// ---------- GET /credentials/siwc/status, GET /oauth/siwc/status ----------
|
|
194
|
+
export interface SIWCStatusQuery { name?: string; id?: string; auth_index?: string; authIndex?: string }
|
|
195
|
+
export interface SIWCStatusResponse { status: SIWCStatus }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type * from './common.ts';
|
|
2
|
+
export type * from './config.ts';
|
|
3
|
+
export type * from './credentials.ts';
|
|
4
|
+
export type * from './oauth.ts';
|
|
5
|
+
export type * from './observability.ts';
|
|
6
|
+
export type * from './plugins.ts';
|
|
7
|
+
export type * from './requests.ts';
|
|
8
|
+
export type * from './routing.ts';
|
|
9
|
+
export type * from './server.ts';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Types for /v8/management/oauth.
|
|
2
|
+
// Derived from CLIProxyAPI v8.0.43; see docs/api-coverage.md.
|
|
3
|
+
|
|
4
|
+
import type { OkStatus, StatusErrorBody } from './common.ts';
|
|
5
|
+
|
|
6
|
+
// ---------- POST /oauth/import ----------
|
|
7
|
+
export interface OAuthImportQuery { provider: 'vertex'; location?: string }
|
|
8
|
+
// multipart: field "file" (service account JSON), optional field "location"
|
|
9
|
+
export interface VertexImportResponse {
|
|
10
|
+
status: 'ok';
|
|
11
|
+
'auth-file': string;
|
|
12
|
+
project_id: string;
|
|
13
|
+
email: string;
|
|
14
|
+
location: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// ---------- GET|POST /oauth/auth-url ----------
|
|
18
|
+
export type BuiltinOAuthProvider =
|
|
19
|
+
| 'claude' | 'codex' | 'antigravity' | 'kimi' | 'kimi-ai' | 'xai' | 'devin' | 'meta';
|
|
20
|
+
export interface OAuthAuthUrlQuery {
|
|
21
|
+
provider?: BuiltinOAuthProvider | (string & {});
|
|
22
|
+
is_webui?: '1' | 'true' | 'yes' | 'on' | '0' | 'false' | 'no' | 'off';
|
|
23
|
+
domain?: string; // kimi
|
|
24
|
+
channel?: string; // kimi
|
|
25
|
+
[pluginMeta: string]: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface OAuthAuthUrlRequest { // POST only
|
|
28
|
+
provider?: BuiltinOAuthProvider | (string & {});
|
|
29
|
+
proxy_url?: string;
|
|
30
|
+
'proxy-url'?: string;
|
|
31
|
+
domain?: string;
|
|
32
|
+
channel?: string;
|
|
33
|
+
is_webui?: boolean | string;
|
|
34
|
+
[pluginMeta: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface OAuthAuthUrlRedirectResponse { status: 'ok'; url: string; state: string }
|
|
37
|
+
export interface OAuthAuthUrlDeviceResponse {
|
|
38
|
+
status: 'ok'; url: string; state: string; flow: 'device';
|
|
39
|
+
user_code?: string; expires_in?: number;
|
|
40
|
+
}
|
|
41
|
+
export type OAuthAuthUrlResponse = OAuthAuthUrlRedirectResponse | OAuthAuthUrlDeviceResponse;
|
|
42
|
+
|
|
43
|
+
// ---------- POST /oauth/siwc/bind ----------
|
|
44
|
+
export interface SIWCBindRequest { name: string }
|
|
45
|
+
export interface SIWCBindResponse { status: 'ok'; url: string; state: string; flow: 'siwc_bind'; expires_in: number }
|
|
46
|
+
|
|
47
|
+
// ---------- GET /oauth/status ----------
|
|
48
|
+
export interface OAuthStatusQuery { state?: string }
|
|
49
|
+
export type OAuthStatusResponse =
|
|
50
|
+
| { status: 'ok' }
|
|
51
|
+
| { status: 'wait' }
|
|
52
|
+
| { status: 'error'; error: string };
|
|
53
|
+
|
|
54
|
+
// ---------- DELETE /oauth/session ----------
|
|
55
|
+
export interface CancelOAuthSessionQuery { state: string }
|
|
56
|
+
export interface CancelOAuthSessionResponse { status: 'ok'; cancelled: boolean }
|
|
57
|
+
|
|
58
|
+
// ---------- GET|POST /oauth/callback (unauthenticated) ----------
|
|
59
|
+
export interface OAuthCallbackQuery {
|
|
60
|
+
provider?: string; state?: string; code?: string;
|
|
61
|
+
error?: string; error_description?: string; client_id?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface OAuthCallbackRequest {
|
|
64
|
+
provider?: string;
|
|
65
|
+
redirect_url?: string;
|
|
66
|
+
code?: string;
|
|
67
|
+
state?: string;
|
|
68
|
+
error?: string;
|
|
69
|
+
client_id?: string; // required for SIWC bind callbacks
|
|
70
|
+
}
|
|
71
|
+
export type OAuthCallbackResponse = OkStatus | StatusErrorBody;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Types for /v8/management/observability.
|
|
2
|
+
// Derived from CLIProxyAPI v8.0.43; see docs/api-coverage.md.
|
|
3
|
+
|
|
4
|
+
import type { RecentRequestBucket } from './common.ts';
|
|
5
|
+
|
|
6
|
+
// ---------- observability/logs ----------
|
|
7
|
+
export interface GetLogsQuery {
|
|
8
|
+
limit?: number; // positive integer
|
|
9
|
+
after?: number; // unix seconds; ignored when cursor is set
|
|
10
|
+
cursor?: string; // opaque, from next-cursor
|
|
11
|
+
}
|
|
12
|
+
export interface GetLogsResponse {
|
|
13
|
+
lines: string[];
|
|
14
|
+
"line-count": number; // returned count (cursor/tail) or total scanned (legacy after-scan)
|
|
15
|
+
"latest-timestamp": number; // unix seconds
|
|
16
|
+
"next-cursor": string; // opaque base64url; may be ""
|
|
17
|
+
"cursor-reset"?: true; // present only when the supplied cursor was invalid/stale
|
|
18
|
+
}
|
|
19
|
+
export interface DeleteLogsResponse { success: true; message: string; removed: number }
|
|
20
|
+
|
|
21
|
+
export interface RequestErrorLogFile { name: string; size: number; modified: number /* unix seconds */ }
|
|
22
|
+
export interface RequestErrorLogsResponse { files: RequestErrorLogFile[] }
|
|
23
|
+
// GET logs/errors/:name and logs/requests/:id return a file attachment (text). Client should return Blob/ArrayBuffer/text + filename from Content-Disposition.
|
|
24
|
+
|
|
25
|
+
// ---------- observability/usage/api-keys ----------
|
|
26
|
+
export interface ApiKeyUsageEntry { success: number; failed: number; recent_requests: RecentRequestBucket[] /* 20 x 10min */ }
|
|
27
|
+
/** provider -> "<base_url>|<api_key>" -> entry */
|
|
28
|
+
export type ApiKeyUsageResponse = Record<string, Record<string, ApiKeyUsageEntry>>;
|
|
29
|
+
|
|
30
|
+
// ---------- observability/usage/queue (DESTRUCTIVE pop) ----------
|
|
31
|
+
export interface UsageQueueQuery { count?: number /* positive int, default 1 */ }
|
|
32
|
+
export interface UsageTokenStats {
|
|
33
|
+
input_tokens: number;
|
|
34
|
+
output_tokens: number;
|
|
35
|
+
reasoning_tokens: number;
|
|
36
|
+
cached_tokens: number;
|
|
37
|
+
cache_read_tokens: number;
|
|
38
|
+
cache_read_tokens_present: boolean;
|
|
39
|
+
cache_creation_tokens: number;
|
|
40
|
+
total_tokens: number;
|
|
41
|
+
}
|
|
42
|
+
export interface UsageTokenBreakdown {
|
|
43
|
+
schema_version: number; // 2
|
|
44
|
+
quality: "complete" | "inconsistent" | "unclassified";
|
|
45
|
+
total_tokens: number;
|
|
46
|
+
input: { total_tokens: number; uncached_tokens: number; cache_read_tokens: number; cache_write_tokens: number };
|
|
47
|
+
output: { total_tokens: number; non_reasoning_tokens: number; reasoning_tokens: number };
|
|
48
|
+
unclassified_tokens: number;
|
|
49
|
+
}
|
|
50
|
+
export interface UsageQueueRecord {
|
|
51
|
+
timestamp: string; // RFC3339
|
|
52
|
+
latency_ms: number;
|
|
53
|
+
ttft_ms: number;
|
|
54
|
+
source: string;
|
|
55
|
+
auth_index: string;
|
|
56
|
+
access_token_sha256?: string;
|
|
57
|
+
client_ip: string;
|
|
58
|
+
resolved_client_ip: string;
|
|
59
|
+
x_forwarded_for: string;
|
|
60
|
+
user_agent: string;
|
|
61
|
+
tokens: UsageTokenStats;
|
|
62
|
+
failed: boolean;
|
|
63
|
+
generate: boolean;
|
|
64
|
+
stream: boolean;
|
|
65
|
+
fail: { status_code: number; body: string }; // status_code 200 when not failed
|
|
66
|
+
response_headers?: Record<string, string[]>;
|
|
67
|
+
accounting_version: number;
|
|
68
|
+
token_breakdown: UsageTokenBreakdown;
|
|
69
|
+
provider: string;
|
|
70
|
+
executor_type: string;
|
|
71
|
+
model: string;
|
|
72
|
+
alias: string;
|
|
73
|
+
endpoint: string;
|
|
74
|
+
auth_type: string;
|
|
75
|
+
api_key: string;
|
|
76
|
+
is_native_key: boolean;
|
|
77
|
+
access_provider?: string;
|
|
78
|
+
request_id: string;
|
|
79
|
+
execution_id?: string;
|
|
80
|
+
trace_id?: string;
|
|
81
|
+
session_id?: string;
|
|
82
|
+
parent_session_id?: string;
|
|
83
|
+
node_kind?: string;
|
|
84
|
+
is_fork?: boolean;
|
|
85
|
+
is_compaction?: boolean;
|
|
86
|
+
reasoning_effort: string;
|
|
87
|
+
service_tier: string;
|
|
88
|
+
effective_service_tier?: string;
|
|
89
|
+
response_service_tier?: string;
|
|
90
|
+
response_model?: string;
|
|
91
|
+
}
|
|
92
|
+
/** Elements are verbatim queued JSON; non-JSON payloads come back as strings. */
|
|
93
|
+
export type UsageQueueResponse = Array<UsageQueueRecord | string>;
|