Skip to content

Commit c934cbb

Browse files
committed
chore(orange): update orange.yaml config and demos/mcp submodule
1 parent 82307f3 commit c934cbb

2 files changed

Lines changed: 99 additions & 4 deletions

File tree

examples/orange/demos/mcp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ Examples:
3535
./mcp server=github initialize
3636
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp profile=default list
3737
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp server=github list
38-
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp profile=default call kiwi__search-flight '{"origin":"SFO","destination":"JFK"}'
38+
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp profile=default call kiwi__search-flight '{"flyFrom":"SFO","flyTo":"JFK","departureDate":"15/07/2025"}'
39+
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp server=github call github__get_me '{}'
40+
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp server=github call github__search_repositories '{"query":"envoy dynamic modules"}'
41+
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp server=github call github__get_file_contents '{"owner":"envoyproxy","repo":"envoy","path":"README.md"}'
3942
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp profile=default stream
4043
ORANGE_MCP_SESSION_ID=<printed-session> ./mcp profile=default delete
4144
@@ -279,7 +282,12 @@ case "$cmd" in
279282
echo
280283
echo "Run the printed export command, then:"
281284
echo " ./mcp list"
282-
echo " ./mcp call kiwi__search-flight '{\"origin\":\"SFO\",\"destination\":\"JFK\"}'"
285+
echo " ./mcp call kiwi__search-flight '{\"flyFrom\":\"SFO\",\"flyTo\":\"JFK\",\"departureDate\":\"15/07/2025\"}'"
286+
echo
287+
echo "GitHub examples (server=github, requires GITHUB_TOKEN):"
288+
echo " ./mcp server=github call github__get_me '{}'"
289+
echo " ./mcp server=github call github__search_repositories '{\"query\":\"envoy dynamic modules\"}'"
290+
echo " ./mcp server=github call github__get_file_contents '{\"owner\":\"envoyproxy\",\"repo\":\"envoy\",\"path\":\"README.md\"}'"
283291
;;
284292
-h|--help|help) usage ;;
285293
*)

examples/orange/orange.yaml

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@ llm:
55
name: claude-haiku-4-5-20251001
66
endpoint_overrides:
77
chat_completions: anthropic_openai_compat
8+
pricing:
9+
input_mtok: 0.80
10+
output_mtok: 4.00
11+
cache_read_mtok: 0.08
12+
cache_write_mtok: 1.00
813
claude-haiku-4-5-20251001:
914
provider: anthropic
15+
pricing:
16+
input_mtok: 0.80
17+
output_mtok: 4.00
18+
cache_read_mtok: 0.08
19+
cache_write_mtok: 1.00
1020
text-embedding-3-small:
1121
provider: openai
1222
metadata:
@@ -239,22 +249,33 @@ keys:
239249

240250
profiles:
241251
demo/dio/default:
252+
path: default
242253
tools:
243254
kiwi:
244255
include: ["search-flight"]
245256
aws-knowledge:
246257
include: ["read_documentation", "search_documentation"]
247258
optional: true # session succeeds even if aws-knowledge is unreachable
248259
github:
249-
include: ["search_repositories"]
260+
include: ["get_me", "search_repositories", "get_file_contents"]
250261
optional: true # session succeeds even if github is unreachable
251262
auth:
252263
github:
253264
type: bearer
254265
secret_ref: env://GITHUB_TOKEN
255266
demo/dio/kiwi-only:
267+
path: kiwi-only
256268
tools:
257269
kiwi: {}
270+
demo/dio/github:
271+
path: github
272+
tools:
273+
github:
274+
include: ["get_me", "search_repositories", "get_file_contents"]
275+
auth:
276+
github:
277+
type: bearer
278+
secret_ref: env://GITHUB_TOKEN
258279

259280
mcp:
260281
servers:
@@ -272,4 +293,70 @@ mcp:
272293
auth:
273294
type: bearer
274295
secret_ref: env://GITHUB_TOKEN # This to be used as default, but profile's secret_ref can override it.
275-
tools_include: ["search_repositories", "get_file_contents"]
296+
tools_include: ["get_me", "search_repositories", "get_file_contents"]
297+
298+
rate_limit:
299+
# Named tiers — reusable limit sets referenced from policies via rule:.
300+
# Inline fields in a policy entry override the tier's value for that entry.
301+
rules:
302+
workspace-standard:
303+
usd_per_day: 500.00
304+
rpm: 300
305+
on_exceed: reject
306+
307+
user-standard:
308+
usd_per_day: 100.00
309+
rpm: 60
310+
on_exceed: reject
311+
312+
key-basic:
313+
usd_per_hour: 10.00
314+
usd_per_day: 50.00
315+
rpm: 20
316+
on_exceed: reject
317+
318+
key-token-knobs:
319+
input_tokens_per_hour: 1_000_000
320+
output_tokens_per_hour: 250_000
321+
cache_read_tokens_per_hour: 2_000_000
322+
cache_write_tokens_per_hour: 200_000
323+
on_exceed: reject
324+
325+
policies:
326+
# Workspace ceiling: every key under "demo" is subject to these limits.
327+
# Changing this entry alone adjusts the cap for the entire workspace.
328+
demo:
329+
- rule: workspace-standard
330+
models: [claude-haiku-4-5, claude-haiku-4-5-20251001]
331+
- models: ["*"]
332+
rpm: 400
333+
on_exceed: reject
334+
335+
# User ceiling: dio's total spend across all keys is bounded here.
336+
# Both the workspace rule above and this rule apply simultaneously.
337+
demo/dio:
338+
- rule: user-standard
339+
models: [claude-haiku-4-5, claude-haiku-4-5-20251001]
340+
- models: ["*"]
341+
rpm: 80
342+
on_exceed: reject
343+
344+
# Key-level policies: stacked on top of workspace and user rules.
345+
demo/dio/sk-default:
346+
- rule: key-basic
347+
models: [claude-haiku-4-5, claude-haiku-4-5-20251001]
348+
- rule: key-token-knobs
349+
models: [claude-haiku-4-5, claude-haiku-4-5-20251001]
350+
- models: ["*"]
351+
rpm: 10
352+
on_exceed: log_only
353+
354+
demo/dio/sk-fallback:
355+
- rule: key-basic
356+
models: [claude-haiku-4-5]
357+
usd_per_hour: 20.00 # override tier: higher budget for fallback key
358+
359+
demo/dio/sk-split:
360+
- rule: key-basic
361+
models: [claude-haiku-4-5, claude-haiku-4-5-20251001]
362+
rpm: 30 # override tier: slightly more headroom for split key

0 commit comments

Comments
 (0)