Skip to content

Commit 625bfb8

Browse files
committed
Enhance CONTRIBUTING.md with model ID error handling and versioning guidelines
1 parent cc2e45e commit 625bfb8

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,48 @@ For providers that use complex model identifiers (like Bedrock's `anthropic.clau
7878
"anthropic": "claude-3-5-sonnet-20241022",
7979
"bedrock": "anthropic.claude-3-5-sonnet-20241022-v2:0:200k",
8080
"openrouter": "anthropic/claude-3.5-sonnet"
81+
},
82+
"gpt-4o": {
83+
"openai": "gpt-4o-2024-05-13",
84+
"bedrock": "anthropic.gpt-4o-2024-05-13",
85+
"openrouter": "openai/gpt-4o"
8186
}
8287
}
8388
```
8489

85-
This allows users to use consistent model names regardless of provider.
90+
If a model can't be found with the provided ID and provider, a `ModelNotFoundError` will be raised with an informative message. Your implementation should make this error helpful by suggesting available alternatives.
91+
92+
When the same model has multiple versions and context windows e.g.
93+
94+
```
95+
anthropic.claude-3-5-sonnet-20240620-v1:0
96+
anthropic.claude-3-5-sonnet-20240620-v1:0:18k
97+
anthropic.claude-3-5-sonnet-20240620-v1:0:200k
98+
anthropic.claude-3-5-sonnet-20240620-v1:0:51k
99+
anthropic.claude-3-5-sonnet-20241022-v2:0
100+
anthropic.claude-3-5-sonnet-20241022-v2:0:18k
101+
anthropic.claude-3-5-sonnet-20241022-v2:0:200k
102+
anthropic.claude-3-5-sonnet-20241022-v2:0:51k
103+
```
104+
105+
We default all aliases to the biggest context window, and the main alias (without date) to the latest version:
106+
107+
```json
108+
"claude-3-5-sonnet": {
109+
"anthropic": "claude-3-5-sonnet-20241022",
110+
"bedrock": "anthropic.claude-3-5-sonnet-20241022-v2:0:200k",
111+
"openrouter": "anthropic/claude-3.5-sonnet"
112+
},
113+
"claude-3-5-sonnet-20241022": {
114+
"anthropic": "claude-3-5-sonnet-20241022",
115+
"bedrock": "anthropic.claude-3-5-sonnet-20241022-v2:0:200k",
116+
"openrouter": "anthropic/claude-3.5-sonnet"
117+
},
118+
"claude-3-5-sonnet-20240620": {
119+
"anthropic": "claude-3-5-sonnet-20240620",
120+
"bedrock": "anthropic.claude-3-5-sonnet-20240620-v1:0:200k"
121+
},
122+
```
86123

87124
## Running Tests
88125

0 commit comments

Comments
 (0)