Skip to content

Commit d3e9843

Browse files
committed
Updated modalities structure
1 parent b166d2a commit d3e9843

File tree

183 files changed

+914
-554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+914
-554
lines changed

README.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,27 @@ Create a new TOML file in the provider's `models/` directory where the filename
5151

5252
```toml
5353
name = "Model Display Name"
54-
attachment = true # or false - supports file attachments
55-
reasoning = false # or true - supports reasoning / chain-of-thought
56-
tool_call = true # or false - supports tool calling
57-
temperature = true # or false - supports temperature control
58-
knowledge = "2024-04" # Knowledge-cutoff date
59-
input_modalities = ["text", "image"] # Supported input modalities
60-
output_modalities = ["text"] # Supported output modalities
61-
release_date = "2025-02-19" # First public release date
62-
last_updated = "2025-02-19" # Most recent update date
54+
attachment = true # or false - supports file attachments
55+
reasoning = false # or true - supports reasoning / chain-of-thought
56+
tool_call = true # or false - supports tool calling
57+
temperature = true # or false - supports temperature control
58+
knowledge = "2024-04" # Knowledge-cutoff date
59+
release_date = "2025-02-19" # First public release date
60+
last_updated = "2025-02-19" # Most recent update date
6361

6462
[cost]
65-
input = 3.00 # Cost per million input tokens (USD)
66-
output = 15.00 # Cost per million output tokens (USD)
67-
cache_read = 0.30 # Cost per million cached read tokens (USD)
68-
cache_write = 3.75 # Cost per million cached write tokens (USD)
63+
input = 3.00 # Cost per million input tokens (USD)
64+
output = 15.00 # Cost per million output tokens (USD)
65+
cache_read = 0.30 # Cost per million cached read tokens (USD)
66+
cache_write = 3.75 # Cost per million cached write tokens (USD)
6967

7068
[limit]
71-
context = 200_000 # Maximum context window (tokens)
72-
output = 8_192 # Maximum output tokens
69+
context = 200_000 # Maximum context window (tokens)
70+
output = 8_192 # Maximum output tokens
71+
72+
[modalities]
73+
input = ["text", "image"] # Supported input modalities
74+
output = ["text"] # Supported output modalities
7375
```
7476

7577
#### 3. Submit a Pull Request
@@ -104,8 +106,6 @@ Models must conform to the following schema, as defined in `app/schemas.ts`.
104106
- `tool_call`: Boolean - Supports tool calling
105107
- `temperature`: Boolean — Supports temperature control
106108
- `knowledge` _(optional)_: String — Knowledge-cutoff date in `YYYY-MM` or `YYYY-MM-DD` format
107-
- `input_modalities`: Array of strings — Supported input modalities (e.g., ["text", "image"])
108-
- `output_modalities`: Array of strings — Supported output modalities (e.g., ["text"])
109109
- `release_date`: String — First public release date in `YYYY-MM` or `YYYY-MM-DD`
110110
- `last_updated`: String — Most recent update date in `YYYY-MM` or `YYYY-MM-DD`
111111
- `cost.input` _(optional)_: Number — Cost per million input tokens (USD)
@@ -114,6 +114,8 @@ Models must conform to the following schema, as defined in `app/schemas.ts`.
114114
- `cost.cache_write` _(optional)_: Number — Cost per million cached write tokens (USD)
115115
- `limit.context`: Number — Maximum context window (tokens)
116116
- `limit.output`: Number — Maximum output tokens
117+
- `modalities.input`: Array of strings — Supported input modalities (e.g., ["text", "image", "audio", "video", "pdf"])
118+
- `modalities.putput`: Array of strings — Supported output modalities (e.g., ["text"])
117119

118120
### Examples
119121

packages/core/src/schema.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ export const Model = z
2020
last_updated: z.string().regex(/^\d{4}-\d{2}(-\d{2})?$/, {
2121
message: "Must be in YYYY-MM or YYYY-MM-DD format",
2222
}),
23-
input_modalities: z.array(
24-
z.enum(["text", "audio", "image", "video", "pdf"])
25-
),
26-
output_modalities: z.array(
27-
z.enum(["text", "audio", "image", "video", "pdf"])
28-
),
23+
modalities: z.object({
24+
input: z.array(z.enum(["text", "audio", "image", "video", "pdf"])),
25+
output: z.array(z.enum(["text", "audio", "image", "video", "pdf"])),
26+
}),
2927
open_weights: z.boolean(),
3028
cost: z
3129
.object({

packages/web/src/render.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,14 @@ export const Rendered = renderToString(
309309
<td>{model.reasoning ? "Yes" : "No"}</td>
310310
<td>
311311
<div class="modalities">
312-
{model.input_modalities?.map((modality) =>
312+
{model.modalities.input.map((modality) =>
313313
getModalityIcon(modality)
314314
)}
315315
</div>
316316
</td>
317317
<td>
318318
<div class="modalities">
319-
{model.output_modalities?.map((modality) =>
319+
{model.modalities.output.map((modality) =>
320320
getModalityIcon(modality)
321321
)}
322322
</div>

providers/amazon-bedrock/models/ai21.jamba-1-5-large-v1:0.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ reasoning = false
66
temperature = true
77
knowledge = "2024-08"
88
tool_call = true
9-
input_modalities = ["text"]
10-
output_modalities = ["text"]
119
open_weights = true
1210

1311
[cost]
@@ -16,4 +14,8 @@ output = 8.00
1614

1715
[limit]
1816
context = 256_000
19-
output = 4_096
17+
output = 4_096
18+
19+
[modalities]
20+
input = ["text"]
21+
output = ["text"]

providers/amazon-bedrock/models/ai21.jamba-1-5-mini-v1:0.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ reasoning = false
66
temperature = true
77
knowledge = "2024-08"
88
tool_call = true
9-
input_modalities = ["text"]
10-
output_modalities = ["text"]
119
open_weights = true
1210

1311
[cost]
@@ -16,4 +14,8 @@ output = 0.40
1614

1715
[limit]
1816
context = 256_000
19-
output = 4_096
17+
output = 4_096
18+
19+
[modalities]
20+
input = ["text"]
21+
output = ["text"]

providers/amazon-bedrock/models/amazon.nova-lite-v1:0.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ reasoning = false
66
temperature = true
77
knowledge = "2024-10"
88
tool_call = true
9-
input_modalities = ["text", "image", "video"]
10-
output_modalities = ["text"]
119
open_weights = false
1210

1311
[cost]
@@ -17,4 +15,8 @@ cache_read = 0.015
1715

1816
[limit]
1917
context = 300_000
20-
output = 8_192
18+
output = 8_192
19+
20+
[modalities]
21+
input = ["text", "image", "video"]
22+
output = ["text"]

providers/amazon-bedrock/models/amazon.nova-micro-v1:0.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ reasoning = false
66
temperature = true
77
knowledge = "2024-10"
88
tool_call = true
9-
input_modalities = ["text"]
10-
output_modalities = ["text"]
119
open_weights = false
1210

1311
[cost]
@@ -17,4 +15,8 @@ cache_read = 0.00875
1715

1816
[limit]
1917
context = 128_000
20-
output = 8_192
18+
output = 8_192
19+
20+
[modalities]
21+
input = ["text"]
22+
output = ["text"]

providers/amazon-bedrock/models/amazon.nova-premier-v1:0.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ reasoning = true
66
temperature = true
77
knowledge = "2024-10"
88
tool_call = true
9-
input_modalities = ["text", "image", "video"]
10-
output_modalities = ["text"]
119
open_weights = false
1210

1311
[cost]
@@ -16,4 +14,8 @@ output = 12.50
1614

1715
[limit]
1816
context = 1_000_000
19-
output = 16_384
17+
output = 16_384
18+
19+
[modalities]
20+
input = ["text", "image", "video"]
21+
output = ["text"]

providers/amazon-bedrock/models/amazon.nova-pro-v1:0.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ reasoning = false
66
temperature = true
77
knowledge = "2024-10"
88
tool_call = true
9-
input_modalities = ["text", "image", "video"]
10-
output_modalities = ["text"]
119
open_weights = false
1210

1311
[cost]
@@ -17,4 +15,8 @@ cache_read = 0.20
1715

1816
[limit]
1917
context = 300_000
20-
output = 8_192
18+
output = 8_192
19+
20+
[modalities]
21+
input = ["text", "image", "video"]
22+
output = ["text"]

providers/amazon-bedrock/models/anthropic.claude-3-5-haiku-20241022-v1:0.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ reasoning = false
66
temperature = true
77
knowledge = "2024-07"
88
tool_call = true
9-
input_modalities = ["text"]
10-
output_modalities = ["text"]
119
open_weights = false
1210

1311
[cost]
@@ -18,4 +16,8 @@ cache_write = 1.00
1816

1917
[limit]
2018
context = 200_000
21-
output = 8_192
19+
output = 8_192
20+
21+
[modalities]
22+
input = ["text"]
23+
output = ["text"]

0 commit comments

Comments
 (0)