File tree Expand file tree Collapse file tree
packages/opencode/src/provider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,22 +21,6 @@ const filepath = path.join(
2121)
2222const ttl = 5 * 60 * 1000
2323
24- type JsonValue = string | number | boolean | null | { [ key : string ] : JsonValue } | JsonValue [ ]
25-
26- // Declared with a mutable type because `Types.DeepMutable` cannot walk a
27- // self-recursive readonly type — it trips TS2589. The derived Schema.Type
28- // is readonly, so we cast at the Schema boundary.
29- const JsonValue : Schema . Schema < JsonValue > = Schema . suspend ( ( ) =>
30- Schema . Union ( [
31- Schema . String ,
32- Schema . Number ,
33- Schema . Boolean ,
34- Schema . Null ,
35- Schema . Array ( JsonValue ) ,
36- Schema . Record ( Schema . String , JsonValue ) ,
37- ] ) ,
38- ) as Schema . Schema < JsonValue >
39-
4024const Cost = Schema . Struct ( {
4125 input : Schema . Number ,
4226 output : Schema . Number ,
@@ -90,7 +74,7 @@ export const Model = Schema.Struct({
9074 cost : Schema . optional ( Cost ) ,
9175 provider : Schema . optional (
9276 Schema . Struct ( {
93- body : Schema . optional ( Schema . Record ( Schema . String , JsonValue ) ) ,
77+ body : Schema . optional ( Schema . Record ( Schema . String , Schema . MutableJson ) ) ,
9478 headers : Schema . optional ( Schema . Record ( Schema . String , Schema . String ) ) ,
9579 } ) ,
9680 ) ,
You can’t perform that action at this time.
0 commit comments