Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions notdiamond/llms/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class NDLLMProviders(Enum):
CLAUDE_OPUS_4_20250514 (NDLLMProvider): refers to 'claude-opus-4-20250514' model by Anthropic
CLAUDE_OPUS_4_1_20250805 (NDLLMProvider): refers to 'claude-opus-4-1-20250805' model by Anthropic
CLAUDE_SONNET_4_20250514 (NDLLMProvider): refers to 'claude-sonnet-4-20250514' model by Anthropic
CLAUDE_SONNET_4_5 (NDLLMProvider): refers to 'claude-sonnet-4-5' model by Anthropic

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also add the dated versino

CLAUDE_SONNET_4_5_20250929 (NDLLMProvider): refers to 'claude-sonnet-4-5-20250929' model by Anthropic
CLAUDE_OPUS_4_0 (NDLLMProvider): refers to 'claude-opus-4-0' model by Anthropic
CLAUDE_OPUS_4_1 (NDLLMProvider): refers to 'claude-opus-4-1' model by Anthropic
CLAUDE_SONNET_4_0 (NDLLMProvider): refers to 'claude-sonnet-4-0' model by Anthropic
Expand Down Expand Up @@ -130,6 +132,8 @@ class NDLLMProviders(Enum):
CLAUDE_OPUS_4_20250514 = ("anthropic", "claude-opus-4-20250514")
CLAUDE_OPUS_4_1_20250805 = ("anthropic", "claude-opus-4-1-20250805")
CLAUDE_SONNET_4_20250514 = ("anthropic", "claude-sonnet-4-20250514")
CLAUDE_SONNET_4_5 = ("anthropic", "claude-sonnet-4-5")
CLAUDE_SONNET_4_5_20250929 = ("anthropic", "claude-sonnet-4-5-20250929")
CLAUDE_OPUS_4_0 = ("anthropic", "claude-opus-4-0")
CLAUDE_OPUS_4_1 = ("anthropic", "claude-opus-4-1")
CLAUDE_SONNET_4_0 = ("anthropic", "claude-sonnet-4-0")
Expand Down
8 changes: 8 additions & 0 deletions notdiamond/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@
"claude-opus-4-20250514",
"claude-opus-4-1-20250805",
"claude-sonnet-4-20250514",
"claude-sonnet-4-5",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add the dated one here as well

"claude-sonnet-4-5-20250929",
"claude-opus-4-0",
"claude-opus-4-1",
"claude-sonnet-4-0",
Expand All @@ -174,6 +176,8 @@
"claude-opus-4-20250514",
"claude-opus-4-1-20250805",
"claude-sonnet-4-20250514",
"claude-sonnet-4-5",
"claude-sonnet-4-5-20250929",
"claude-opus-4-0",
"claude-opus-4-1",
"claude-sonnet-4-0",
Expand All @@ -195,6 +199,8 @@
"claude-opus-4-20250514": "anthropic/claude-opus-4",
"claude-opus-4-1-20250805": "anthropic/claude-opus-4-1-20250805",
"claude-sonnet-4-20250514": "anthropic/claude-sonnet-4",
"claude-sonnet-4-5": "anthropic/claude-sonnet-4-5",
"claude-sonnet-4-5-20250929": "anthropic/claude-sonnet-4-5",
"claude-opus-4-0": "anthropic/claude-opus-4",
"claude-opus-4-1": "anthropic/claude-opus-4-1",
"claude-sonnet-4-0": "anthropic/claude-sonnet-4",
Expand All @@ -213,6 +219,8 @@
"claude-opus-4-20250514": {"input": 15.0, "output": 75.0},
"claude-opus-4-1-20250805": {"input": 15.0, "output": 75.0},
"claude-sonnet-4-20250514": {"input": 3.0, "output": 15.0},
"claude-sonnet-4-5": {"input": 3.0, "output": 15.0},
"claude-sonnet-4-5-20250929": {"input": 3.0, "output": 15.0},
"claude-opus-4-0": {"input": 15.0, "output": 75.0},
"claude-opus-4-1": {"input": 15.0, "output": 75.0},
"claude-sonnet-4-0": {"input": 3.0, "output": 15.0},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
interactions:
- request:
body: '{"messages": [{"role": "user", "content": "How much is 3 + 5?"}], "llm_providers":
[{"provider": "anthropic", "model": "claude-sonnet-4-5", "is_custom": false,
"context_length": null, "input_price": null, "output_price": null, "latency":
null}], "metric": "accuracy", "max_model_depth": 1, "hash_content": true, "tools":
[{"type": "function", "function": {"name": "add_fct", "description": "Add two
numbers", "parameters": {"type": "object", "properties": {"a": {"type": "integer",
"description": "The first number"}, "b": {"type": "integer", "description":
"The second number"}}, "required": ["a", "b"]}}}]}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '608'
User-Agent:
- Python-SDK/0.4.6
content-type:
- application/json
method: POST
uri: https://staging-api.notdiamond.ai/v2/modelRouter/modelSelect
response:
body:
string: '{"detail":"Provider claude-sonnet-4-5 not recognized."}'
headers:
CF-RAY:
- 98c6e24f0e9c0547-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Fri, 10 Oct 2025 14:42:24 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
rndr-id:
- 0876ff1a-9b5a-4b8d
vary:
- Accept-Encoding
x-render-origin-server:
- uvicorn
x-request-id:
- 0876ff1a-9b5a-4b8d
status:
code: 400
message: Bad Request
- request:
body: '{"max_tokens":200,"messages":[{"role":"user","content":"How much is 3 +
5?"}],"model":"claude-sonnet-4-5","tools":[{"name":"add_fct","description":"Add
two numbers","input_schema":{"type":"object","properties":{"a":{"type":"integer","description":"The
first number"},"b":{"type":"integer","description":"The second number"}},"required":["a","b"]}}]}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate, zstd
anthropic-version:
- '2023-06-01'
connection:
- keep-alive
content-length:
- '349'
content-type:
- application/json
host:
- api.anthropic.com
user-agent:
- Anthropic/Python 0.49.0
x-api-key:
- REDACTED
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 0.49.0
x-stainless-read-timeout:
- '120.0'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.12
x-stainless-timeout:
- NOT_GIVEN
method: POST
uri: https://api.anthropic.com/v1/messages
response:
body:
string: '{"model":"claude-sonnet-4-5-20250929","id":"msg_018RH9GR3icDmyGZgXN89e5a","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01NDJdQv5LWScdEQTtPEsHKJ","name":"add_fct","input":{"a":3,"b":5}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":594,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":71,"service_tier":"standard"}}'
headers:
CF-RAY:
- 98c6e256b8dfe441-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Fri, 10 Oct 2025 14:42:27 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Robots-Tag:
- none
anthropic-organization-id:
- a2610b2c-742e-455d-9552-6abe105b2a44
anthropic-ratelimit-input-tokens-limit:
- '2000000'
anthropic-ratelimit-input-tokens-remaining:
- '2000000'
anthropic-ratelimit-input-tokens-reset:
- '2025-10-10T14:42:26Z'
anthropic-ratelimit-output-tokens-limit:
- '400000'
anthropic-ratelimit-output-tokens-remaining:
- '400000'
anthropic-ratelimit-output-tokens-reset:
- '2025-10-10T14:42:27Z'
anthropic-ratelimit-requests-limit:
- '4000'
anthropic-ratelimit-requests-remaining:
- '3999'
anthropic-ratelimit-requests-reset:
- '2025-10-10T14:42:24Z'
anthropic-ratelimit-tokens-limit:
- '2400000'
anthropic-ratelimit-tokens-remaining:
- '2400000'
anthropic-ratelimit-tokens-reset:
- '2025-10-10T14:42:26Z'
cf-cache-status:
- DYNAMIC
content-length:
- '478'
request-id:
- req_011CTyhCuxKyzFdmUyckYkQt
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
via:
- 1.1 google
x-envoy-upstream-service-time:
- '2541'
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
interactions:
- request:
body: '{"messages": [{"role": "user", "content": "How much is 3 + 5?"}], "llm_providers":
[{"provider": "anthropic", "model": "claude-sonnet-4-5", "is_custom": false,
"context_length": null, "input_price": null, "output_price": null, "latency":
null}], "metric": "accuracy", "max_model_depth": 1, "hash_content": true, "tools":
[{"type": "function", "function": {"name": "add_fct", "description": "Adds a
and b.", "parameters": {"properties": {"a": {"type": "integer"}, "b": {"type":
"integer"}}, "required": ["a", "b"], "type": "object"}}}]}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '535'
User-Agent:
- Python-SDK/0.4.6
content-type:
- application/json
method: POST
uri: https://staging-api.notdiamond.ai/v2/modelRouter/modelSelect
response:
body:
string: '{"detail":"Provider claude-sonnet-4-5 not recognized."}'
headers:
CF-RAY:
- 98c6e2378e83f4c8-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Fri, 10 Oct 2025 14:42:20 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
rndr-id:
- 2f0bfe9a-ece0-4332
vary:
- Accept-Encoding
x-render-origin-server:
- uvicorn
x-request-id:
- 2f0bfe9a-ece0-4332
status:
code: 400
message: Bad Request
- request:
body: '{"max_tokens":200,"messages":[{"role":"user","content":"How much is 3 +
5?"}],"model":"claude-sonnet-4-5","tools":[{"name":"add_fct","description":"Adds
a and b.","input_schema":{"properties":{"a":{"type":"integer"},"b":{"type":"integer"}},"required":["a","b"],"type":"object"}}]}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate, zstd
anthropic-version:
- '2023-06-01'
connection:
- keep-alive
content-length:
- '280'
content-type:
- application/json
host:
- api.anthropic.com
user-agent:
- Anthropic/Python 0.49.0
x-api-key:
- REDACTED
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 0.49.0
x-stainless-read-timeout:
- '120.0'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.12
x-stainless-timeout:
- NOT_GIVEN
method: POST
uri: https://api.anthropic.com/v1/messages
response:
body:
string: '{"model":"claude-sonnet-4-5-20250929","id":"msg_01StJ39QiZdUGC7E3Fh8egWe","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_013TiR2TGDYy3NgUcM54SMKi","name":"add_fct","input":{"a":3,"b":5}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":580,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":71,"service_tier":"standard"}}'
headers:
CF-RAY:
- 98c6e23e088b48d5-OTP
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Fri, 10 Oct 2025 14:42:23 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Robots-Tag:
- none
anthropic-organization-id:
- a2610b2c-742e-455d-9552-6abe105b2a44
anthropic-ratelimit-input-tokens-limit:
- '2000000'
anthropic-ratelimit-input-tokens-remaining:
- '2000000'
anthropic-ratelimit-input-tokens-reset:
- '2025-10-10T14:42:22Z'
anthropic-ratelimit-output-tokens-limit:
- '400000'
anthropic-ratelimit-output-tokens-remaining:
- '400000'
anthropic-ratelimit-output-tokens-reset:
- '2025-10-10T14:42:22Z'
anthropic-ratelimit-requests-limit:
- '4000'
anthropic-ratelimit-requests-remaining:
- '3999'
anthropic-ratelimit-requests-reset:
- '2025-10-10T14:42:20Z'
anthropic-ratelimit-tokens-limit:
- '2400000'
anthropic-ratelimit-tokens-remaining:
- '2400000'
anthropic-ratelimit-tokens-reset:
- '2025-10-10T14:42:22Z'
cf-cache-status:
- DYNAMIC
content-length:
- '478'
request-id:
- req_011CTyhCd4aSLGxzcDbVsRCP
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
via:
- 1.1 google
x-envoy-upstream-service-time:
- '2403'
status:
code: 200
message: OK
version: 1
Loading
Loading