| 101 | |
| 102 | |
| 103 | def cases() -> list[Case]: |
| 104 | many_tools = [CHAT_TOOL, READ_TOOL, WRITE_TOOL, WEB_TOOL, TASK_TOOL] |
| 105 | simple = ("economy", "balanced") |
| 106 | medium = ("balanced", "economy") |
| 107 | complex_quality = ("balanced", "premium") |
| 108 | |
| 109 | return [ |
| 110 | Case("S01 hello", "SIMPLE", user("hello"), acceptable_qualities=simple), |
| 111 | Case("S02 thanks", "SIMPLE", user("thanks!"), acceptable_qualities=simple), |
| 112 | Case("S03 arithmetic", "SIMPLE", user("What is 17 * 23?"), acceptable_qualities=simple), |
| 113 | Case("S04 translate", "SIMPLE", user('Translate "good morning" to Spanish.'), acceptable_qualities=simple), |
| 114 | Case( |
| 115 | "S05 subject line", |
| 116 | "SIMPLE", |
| 117 | user("Write one concise subject line for a meeting reminder."), |
| 118 | acceptable_qualities=simple, |
| 119 | ), |
| 120 | Case("S06 cjk hello", "SIMPLE", user("你好"), acceptable_qualities=simple), |
| 121 | Case("S07 linear equation", "SIMPLE", user("Solve 2x + 5 = 17."), acceptable_qualities=simple), |
| 122 | Case( |
| 123 | "S08 json colors", |
| 124 | "MEDIUM", |
| 125 | { |
| 126 | "model": "uncommon-route/auto", |
| 127 | "messages": [ |
| 128 | {"role": "system", "content": "Respond in JSON format."}, |
| 129 | {"role": "user", "content": "list 3 colors"}, |
| 130 | ], |
| 131 | "max_tokens": 96, |
| 132 | }, |
| 133 | acceptable_qualities=medium, |
| 134 | ), |
| 135 | Case( |
| 136 | "S09 wrapper hello tools", |
| 137 | "SIMPLE", |
| 138 | { |
| 139 | "model": "uncommon-route/auto", |
| 140 | "messages": [ |
| 141 | {"role": "system", "content": "You are Claude Code."}, |
| 142 | {"role": "user", "content": [{"type": "text", "text": WRAPPER}, {"type": "text", "text": "hello"}]}, |
| 143 | ], |
| 144 | "tools": many_tools, |
| 145 | "max_tokens": 48, |
| 146 | }, |
| 147 | acceptable_qualities=simple, |
| 148 | ), |
| 149 | Case( |
| 150 | "S10 shell one-liner", |
| 151 | "SIMPLE", |
| 152 | user("Give me a shell one-liner to count lines in all Python files under src."), |
| 153 | acceptable_qualities=simple, |
| 154 | ), |
| 155 | Case( |
| 156 | "M01 photosynthesis", |
| 157 | "MEDIUM", |
| 158 | user("Explain photosynthesis to a high school student in two paragraphs."), |
| 159 | acceptable_qualities=medium, |
| 160 | ), |