Validate the Copilot models and pricing table against its schema (#64… · github/docs@8ac0ab4 · GitHub
Skip to content

Commit 8ac0ab4

Browse files
heiskrCopilotV-halfaro
authored
Validate the Copilot models and pricing table against its schema (#64157)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Hector A. <v-halfaro@github.com> Copilot-Session: bf5940de-658e-4a1a-bffa-3018fb78b138
1 parent 957a8ab commit 8ac0ab4

3 files changed

Lines changed: 81 additions & 64 deletions

File tree

‎src/data-directory/lib/data-schemas/index.ts‎

Lines changed: 3 additions & 0 deletions

‎src/data-directory/lib/data-schemas/tables/copilot/models-and-pricing.ts‎

Lines changed: 57 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,61 @@
11
const modelsAndPricingSchema = {
2-
type: 'object',
3-
additionalProperties: false,
4-
required: ['models'],
5-
properties: {
6-
models: {
7-
type: 'array',
8-
items: {
9-
type: 'object',
10-
additionalProperties: false,
11-
required: [
12-
'model',
13-
'provider',
14-
'release_status',
15-
'category',
16-
'input',
17-
'cached_input',
18-
'output',
19-
],
20-
properties: {
21-
model: {
22-
type: 'string',
23-
lintable: true,
24-
},
25-
provider: {
26-
type: 'string',
27-
enum: ['openai', 'anthropic', 'google', 'microsoft', 'xai', 'github'],
28-
},
29-
release_status: {
30-
type: 'string',
31-
lintable: true,
32-
},
33-
category: {
34-
type: 'string',
35-
lintable: true,
36-
},
37-
input: {
38-
type: 'string',
39-
lintable: true,
40-
},
41-
cached_input: {
42-
type: 'string',
43-
lintable: true,
44-
},
45-
output: {
46-
type: 'string',
47-
lintable: true,
48-
},
49-
threshold: {
50-
type: 'string',
51-
lintable: true,
52-
},
53-
tier: {
54-
type: 'string',
55-
lintable: true,
56-
},
57-
cache_write: {
58-
type: 'string',
59-
lintable: true,
60-
},
61-
notes: {
62-
type: 'string',
63-
lintable: true,
64-
},
65-
},
2+
type: 'array',
3+
items: {
4+
type: 'object',
5+
additionalProperties: false,
6+
required: [
7+
'model',
8+
'provider',
9+
'release_status',
10+
'category',
11+
'input',
12+
'cached_input',
13+
'output',
14+
],
15+
properties: {
16+
model: {
17+
type: 'string',
18+
lintable: true,
19+
},
20+
provider: {
21+
type: 'string',
22+
enum: ['openai', 'anthropic', 'google', 'microsoft', 'moonshot_ai', 'xai', 'github'],
23+
},
24+
release_status: {
25+
type: 'string',
26+
lintable: true,
27+
},
28+
category: {
29+
type: 'string',
30+
lintable: true,
31+
},
32+
input: {
33+
type: 'string',
34+
lintable: true,
35+
},
36+
cached_input: {
37+
type: 'string',
38+
lintable: true,
39+
},
40+
output: {
41+
type: 'string',
42+
lintable: true,
43+
},
44+
threshold: {
45+
type: 'string',
46+
lintable: true,
47+
},
48+
tier: {
49+
type: 'string',
50+
lintable: true,
51+
},
52+
cache_write: {
53+
type: 'string',
54+
lintable: true,
55+
},
56+
notes: {
57+
type: 'string',
58+
lintable: true,
6659
},
6760
},
6861
},

‎src/data-directory/tests/data-schemas.ts‎

Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)