euron-code 1.4.0__tar.gz → 1.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {euron_code-1.4.0 → euron_code-1.5.1}/CHANGELOG.md +26 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/PKG-INFO +28 -8
- {euron_code-1.4.0 → euron_code-1.5.1}/README.md +27 -7
- {euron_code-1.4.0 → euron_code-1.5.1}/pyproject.toml +1 -1
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/__init__.py +1 -1
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/agent.py +43 -6
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/cli.py +42 -11
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/llm/__init__.py +78 -4
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/llm/setup.py +8 -3
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/prompts.py +4 -2
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/repl.py +30 -7
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/__init__.py +19 -6
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/oss.py +16 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/reuse.py +4 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/mock_gateway.py +29 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_bench_harness.py +33 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_qa_reuse_unrelated.py +4 -1
- euron_code-1.5.1/tests/test_v15_hosted_models.py +190 -0
- euron_code-1.5.1/tests/test_v15_reuse_off_subagent_hooks.py +115 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v4.py +5 -3
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v5.py +10 -5
- {euron_code-1.4.0 → euron_code-1.5.1}/.gitignore +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/LICENSE +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/__main__.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/activity.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/api.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/attachments.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/auth.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/builtin_skills/build-from-reference/SKILL.md +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/builtin_skills/explain-codebase/SKILL.md +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/builtin_skills/review/SKILL.md +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/builtin_skills/test-writer/SKILL.md +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/cache.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/checkpoints.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/config.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/context.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/contextforge/LICENSE +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/contextforge/__init__.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/contextforge/text.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/contextforge/toolout.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/credentials.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/doctor.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/documents.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/error_hints.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/errorlog.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/frontmatter.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/hooks.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/keys.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/knowledge.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/licensing.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/llm/anthropic.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/llm/base.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/llm/openai_compat.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/logo.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/markdown_view.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/memory.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/osscache.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/ossgithub.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/pathfix.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/permissions.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/progress.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/project_setup.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/repomap.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/rules.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/security_scan.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/sessions.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/skills.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/textsafe.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/background.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/base.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/db.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/document.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/erie.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/fs.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/ignore.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/normalize.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/pathfind.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/search.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/shell.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/skill.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/symbols.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/task.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/todo.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/tools/web.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/transcript.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/trust.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/ui.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/update_check.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/usage_view.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/src/euron_code/version_info.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/conftest.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/fake_providers.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/helpers.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/measure_floor.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/serve_helper.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/sim_long_session.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_agent_mock.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_api_shell.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_bench.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_cli_e2e.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_context_memory_sessions.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_dashboard_fixes.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_dashboard_fixes_102.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_db.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_erie.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_knowledge_security.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_markdown_view.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_oss_local.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_permissions.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_powershell_exit_codes.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_qa_attach_secrets.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_qa_long_task.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_qa_print_output.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_qa_yolo_outside.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_repl.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_reuse_honesty.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_search.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_textsafe.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_tools_fs.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_transcript_ui.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_update_check.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v111_user_reports.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v113_fix_path.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v11_byo.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v11_speed.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v11_tool_fixes.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v130_cut_writes.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v130_reliability.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v140_parity.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v2_rules_skills_hooks.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v2_tokens_shortcuts.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v2_usage_headers.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v31_security.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v3_accounts_value_setup.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v3_activity.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v3_attachments.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v3_context.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v3_live_repl.py +0 -0
- {euron_code-1.4.0 → euron_code-1.5.1}/tests/test_v3_single_login.py +0 -0
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.1 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
Default is the Euron model on Euron's own GPUs; bring your own Anthropic/OpenAI/any key, billed by your provider.
|
|
6
|
+
|
|
7
|
+
- The default, and the only model Euron runs for you, is the Euron model: Euron's own model on Euron's own GPUs,
|
|
8
|
+
included with Euron Plus and Super 30. Your prompts and code go to Euron's own servers.
|
|
9
|
+
- Want Claude, GPT or another model? `euron models add anthropic` (or `openai`, `openrouter`, `custom` for any
|
|
10
|
+
OpenAI-compatible endpoint), or `euron --model provider:model`, or `/model add` in a session. It uses your key,
|
|
11
|
+
your provider bills you, and Euron charges nothing for it.
|
|
12
|
+
- `/model` and `euron models` list the Euron model first, as the default; your own models are marked as using your
|
|
13
|
+
key and billed by your provider.
|
|
14
|
+
- Asked which model it is, Euron Code on the Euron model says it runs on the Euron model and never claims another
|
|
15
|
+
company's model. With your own model it names that model.
|
|
16
|
+
- The 1.5.0 notes below described hosted provider models as the default. Those were never switched on and are not
|
|
17
|
+
offered.
|
|
18
|
+
|
|
19
|
+
## 1.5.0 (2026-11-10)
|
|
20
|
+
|
|
21
|
+
- The status line and `/model` say which model answers, and Euron Code answers honestly when you ask which model
|
|
22
|
+
it is, including after a switch.
|
|
23
|
+
- Notes from Euron about the model that answered are shown once per kind.
|
|
24
|
+
- With `reuse.enabled` set to false, every open-source and Euron reuse tool is off, and no GitHub repository is
|
|
25
|
+
downloaded.
|
|
26
|
+
- Read-only and parallel sub-agents run your hooks (PreToolUse, PostToolUse) and permission rules, like the main
|
|
27
|
+
agent.
|
|
28
|
+
|
|
3
29
|
## 1.4.0 (2026-11-09)
|
|
4
30
|
|
|
5
31
|
Fewer wasted steps and fewer missed details, from a benchmark of real student-style tasks with hidden tests.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: euron-code
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.1
|
|
4
4
|
Summary: Euron Code: an agentic coding assistant in your terminal for Euron Plus and Super 30 students.
|
|
5
5
|
Project-URL: Homepage, https://euron.one/code-agent
|
|
6
6
|
Author-email: Euron <contact@euron.one>
|
|
@@ -188,19 +188,30 @@ https://euron.one/code-agent/usage.
|
|
|
188
188
|
- **Live progress.** While it works you see what it is doing, the time, tokens and an `esc to interrupt`
|
|
189
189
|
line, and you can keep typing (see below).
|
|
190
190
|
|
|
191
|
+
## Euron models
|
|
192
|
+
|
|
193
|
+
Euron Code's default is the **Euron model**: Euron's own model, run by Euron on Euron's own GPUs. It is
|
|
194
|
+
included with Euron Plus and Super 30; you only need your Euron login. Your prompts and the code Euron Code
|
|
195
|
+
sends go to Euron's own servers and nowhere else. Your daily token allowance applies to it.
|
|
196
|
+
|
|
197
|
+
If you would rather use Claude, GPT or any other model, bring your own key (next section). That model is
|
|
198
|
+
billed by its provider, on your account, not by Euron.
|
|
199
|
+
|
|
191
200
|
## Use your own model
|
|
192
201
|
|
|
193
202
|
> Available from **Euron Code 1.1.0**. Check yours with `euron version` (or `euron --version`, or `/version`
|
|
194
203
|
> inside a session) and update with `pip install -U euron-code`.
|
|
195
204
|
|
|
196
|
-
The Euron model is included with Euron Plus and Super 30. Any signed-in Euron account can
|
|
197
|
-
own model: OpenAI, Claude (Anthropic),
|
|
198
|
-
OpenAI-compatible endpoint (LM Studio, Together, the EURI API, your own
|
|
205
|
+
The Euron model is the default and is included with Euron Plus and Super 30. Any signed-in Euron account can
|
|
206
|
+
also use its own model with its own API key: OpenAI, Claude (Anthropic), OpenRouter, Google Gemini, Groq,
|
|
207
|
+
Ollama on your computer, or any OpenAI-compatible endpoint (LM Studio, Together, the EURI API, your own
|
|
208
|
+
server). Everything else works the
|
|
199
209
|
same: tools, plan mode, permissions, hooks, rewind and automatic context management.
|
|
200
210
|
|
|
201
211
|
Your API key stays on your computer (system keychain, or `~/.euron/credentials.json` readable only by you),
|
|
202
|
-
is sent only to that provider, and is never printed, logged or sent to Euron.
|
|
203
|
-
|
|
212
|
+
is sent only to that provider, and is never printed, logged or sent to Euron. With your own model, your
|
|
213
|
+
prompts and code go to that provider, it bills you for them, and Euron pays nothing and charges nothing. It
|
|
214
|
+
does not use your Euron tokens.
|
|
204
215
|
|
|
205
216
|
The quickest way is the guided setup. It asks for the provider, the key (hidden as you type), and the model,
|
|
206
217
|
then checks that the model answers and can call tools:
|
|
@@ -220,6 +231,8 @@ euron --model openai:<model-id> # or use a model id directly for o
|
|
|
220
231
|
**Claude (Anthropic)**
|
|
221
232
|
|
|
222
233
|
```bash
|
|
234
|
+
euron models add anthropic # asks for the key (hidden), lists your models, checks one answers
|
|
235
|
+
# or, with the key in the environment:
|
|
223
236
|
export ANTHROPIC_API_KEY=sk-ant-... # PowerShell: $env:ANTHROPIC_API_KEY = "sk-ant-..."
|
|
224
237
|
euron --model anthropic:claude-sonnet-5-5
|
|
225
238
|
```
|
|
@@ -238,6 +251,13 @@ euron --model ollama:llama3.1
|
|
|
238
251
|
Pick a local model that supports tool calling. Ollama on another machine: `euron models add ollama` and
|
|
239
252
|
give its address (or set `OLLAMA_HOST`).
|
|
240
253
|
|
|
254
|
+
**OpenRouter (hundreds of models with one key)**
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
euron models add openrouter # or: export OPENROUTER_API_KEY=sk-or-...
|
|
258
|
+
euron --model openrouter:<vendor>/<model-id> # e.g. the id shown on openrouter.ai/models
|
|
259
|
+
```
|
|
260
|
+
|
|
241
261
|
**Any OpenAI-compatible endpoint**
|
|
242
262
|
|
|
243
263
|
```bash
|
|
@@ -253,13 +273,13 @@ Built-in names that only need their key in the environment: `gemini` (`GEMINI_AP
|
|
|
253
273
|
|
|
254
274
|
| Where | Command |
|
|
255
275
|
|---|---|
|
|
256
|
-
| in a session | `/model` (pick with the arrow keys), `/model
|
|
276
|
+
| in a session | `/model` (pick with the arrow keys), `/model euron` (back to the Euron model), `/model add`, `/model <provider:model>`, `/model remove <provider>` |
|
|
257
277
|
| default for every run | `euron models use <provider:model>`, back with `euron models use euron` |
|
|
258
278
|
| one run | `euron --model <provider:model>` (also with `-p`) |
|
|
259
279
|
| see what is set up | `euron models` |
|
|
260
280
|
|
|
261
281
|
The conversation is kept when you switch. The status line shows which model answers: "Euron model", or your
|
|
262
|
-
own model's name. Your own model's context window is taken from its known size (or the `contextWindow` you
|
|
282
|
+
own model's name; asked which model it is, Euron Code says the same. Your own model's context window is taken from its known size (or the `contextWindow` you
|
|
263
283
|
gave in `euron models add`), up to `byoMaxContext` (128,000 tokens by default, because every step resends the
|
|
264
284
|
conversation on your bill). A model that cannot call tools is refused with a clear message.
|
|
265
285
|
|
|
@@ -122,19 +122,30 @@ https://euron.one/code-agent/usage.
|
|
|
122
122
|
- **Live progress.** While it works you see what it is doing, the time, tokens and an `esc to interrupt`
|
|
123
123
|
line, and you can keep typing (see below).
|
|
124
124
|
|
|
125
|
+
## Euron models
|
|
126
|
+
|
|
127
|
+
Euron Code's default is the **Euron model**: Euron's own model, run by Euron on Euron's own GPUs. It is
|
|
128
|
+
included with Euron Plus and Super 30; you only need your Euron login. Your prompts and the code Euron Code
|
|
129
|
+
sends go to Euron's own servers and nowhere else. Your daily token allowance applies to it.
|
|
130
|
+
|
|
131
|
+
If you would rather use Claude, GPT or any other model, bring your own key (next section). That model is
|
|
132
|
+
billed by its provider, on your account, not by Euron.
|
|
133
|
+
|
|
125
134
|
## Use your own model
|
|
126
135
|
|
|
127
136
|
> Available from **Euron Code 1.1.0**. Check yours with `euron version` (or `euron --version`, or `/version`
|
|
128
137
|
> inside a session) and update with `pip install -U euron-code`.
|
|
129
138
|
|
|
130
|
-
The Euron model is included with Euron Plus and Super 30. Any signed-in Euron account can
|
|
131
|
-
own model: OpenAI, Claude (Anthropic),
|
|
132
|
-
OpenAI-compatible endpoint (LM Studio, Together, the EURI API, your own
|
|
139
|
+
The Euron model is the default and is included with Euron Plus and Super 30. Any signed-in Euron account can
|
|
140
|
+
also use its own model with its own API key: OpenAI, Claude (Anthropic), OpenRouter, Google Gemini, Groq,
|
|
141
|
+
Ollama on your computer, or any OpenAI-compatible endpoint (LM Studio, Together, the EURI API, your own
|
|
142
|
+
server). Everything else works the
|
|
133
143
|
same: tools, plan mode, permissions, hooks, rewind and automatic context management.
|
|
134
144
|
|
|
135
145
|
Your API key stays on your computer (system keychain, or `~/.euron/credentials.json` readable only by you),
|
|
136
|
-
is sent only to that provider, and is never printed, logged or sent to Euron.
|
|
137
|
-
|
|
146
|
+
is sent only to that provider, and is never printed, logged or sent to Euron. With your own model, your
|
|
147
|
+
prompts and code go to that provider, it bills you for them, and Euron pays nothing and charges nothing. It
|
|
148
|
+
does not use your Euron tokens.
|
|
138
149
|
|
|
139
150
|
The quickest way is the guided setup. It asks for the provider, the key (hidden as you type), and the model,
|
|
140
151
|
then checks that the model answers and can call tools:
|
|
@@ -154,6 +165,8 @@ euron --model openai:<model-id> # or use a model id directly for o
|
|
|
154
165
|
**Claude (Anthropic)**
|
|
155
166
|
|
|
156
167
|
```bash
|
|
168
|
+
euron models add anthropic # asks for the key (hidden), lists your models, checks one answers
|
|
169
|
+
# or, with the key in the environment:
|
|
157
170
|
export ANTHROPIC_API_KEY=sk-ant-... # PowerShell: $env:ANTHROPIC_API_KEY = "sk-ant-..."
|
|
158
171
|
euron --model anthropic:claude-sonnet-5-5
|
|
159
172
|
```
|
|
@@ -172,6 +185,13 @@ euron --model ollama:llama3.1
|
|
|
172
185
|
Pick a local model that supports tool calling. Ollama on another machine: `euron models add ollama` and
|
|
173
186
|
give its address (or set `OLLAMA_HOST`).
|
|
174
187
|
|
|
188
|
+
**OpenRouter (hundreds of models with one key)**
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
euron models add openrouter # or: export OPENROUTER_API_KEY=sk-or-...
|
|
192
|
+
euron --model openrouter:<vendor>/<model-id> # e.g. the id shown on openrouter.ai/models
|
|
193
|
+
```
|
|
194
|
+
|
|
175
195
|
**Any OpenAI-compatible endpoint**
|
|
176
196
|
|
|
177
197
|
```bash
|
|
@@ -187,13 +207,13 @@ Built-in names that only need their key in the environment: `gemini` (`GEMINI_AP
|
|
|
187
207
|
|
|
188
208
|
| Where | Command |
|
|
189
209
|
|---|---|
|
|
190
|
-
| in a session | `/model` (pick with the arrow keys), `/model
|
|
210
|
+
| in a session | `/model` (pick with the arrow keys), `/model euron` (back to the Euron model), `/model add`, `/model <provider:model>`, `/model remove <provider>` |
|
|
191
211
|
| default for every run | `euron models use <provider:model>`, back with `euron models use euron` |
|
|
192
212
|
| one run | `euron --model <provider:model>` (also with `-p`) |
|
|
193
213
|
| see what is set up | `euron models` |
|
|
194
214
|
|
|
195
215
|
The conversation is kept when you switch. The status line shows which model answers: "Euron model", or your
|
|
196
|
-
own model's name. Your own model's context window is taken from its known size (or the `contextWindow` you
|
|
216
|
+
own model's name; asked which model it is, Euron Code says the same. Your own model's context window is taken from its known size (or the `contextWindow` you
|
|
197
217
|
gave in `euron models add`), up to `byoMaxContext` (128,000 tokens by default, because every step resends the
|
|
198
218
|
conversation on your bill). A model that cannot call tools is refused with a clear message.
|
|
199
219
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "euron-code"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.5.1"
|
|
8
8
|
description = "Euron Code: an agentic coding assistant in your terminal for Euron Plus and Super 30 students."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -197,7 +197,7 @@ class Agent:
|
|
|
197
197
|
if is_subagent and subagent_mode == "write":
|
|
198
198
|
self.tools = default_tools(settings, subagents=False)
|
|
199
199
|
else:
|
|
200
|
-
self.tools = read_only_tools() if is_subagent else default_tools(settings)
|
|
200
|
+
self.tools = read_only_tools(settings) if is_subagent else default_tools(settings)
|
|
201
201
|
self.tool_map = {t.name: t for t in self.tools}
|
|
202
202
|
self.tool_schemas = [t.schema() for t in self.tools]
|
|
203
203
|
if self.window <= SMALL_WINDOW:
|
|
@@ -210,6 +210,7 @@ class Agent:
|
|
|
210
210
|
self.tokens = context.TokenTracker()
|
|
211
211
|
self.cancel = threading.Event()
|
|
212
212
|
self.pending_note: Optional[str] = None
|
|
213
|
+
self._notices_shown: set = set() # gateway notices already shown
|
|
213
214
|
self.pending_context: List[str] = [] # hook output, `!` commands: added to the next prompt
|
|
214
215
|
self.pending_images: List[Dict[str, Any]] = [] # image_url parts for the next prompt
|
|
215
216
|
self.pending_image_paths: List[Path] = [] # their local files (a photo may belong on the page)
|
|
@@ -221,7 +222,9 @@ class Agent:
|
|
|
221
222
|
self.rules = rules.RuleSet([])
|
|
222
223
|
self.skills: Dict[str, skills.Skill] = {}
|
|
223
224
|
self.system_parts: Dict[str, str] = {}
|
|
224
|
-
|
|
225
|
+
# sub-agents get the user's hooks too (their tool calls run PreToolUse / PostToolUse like the main
|
|
226
|
+
# agent's); SessionStart, UserPromptSubmit and Stop stay with the main agent (_run_hooks)
|
|
227
|
+
self.hooks = hooks
|
|
225
228
|
self.checkpoints = Checkpoints()
|
|
226
229
|
self.steps = 0 # model steps this session ("turn N" in read dedupe notes)
|
|
227
230
|
self.on_usage: Optional[Callable[[], None]] = None
|
|
@@ -283,16 +286,27 @@ class Agent:
|
|
|
283
286
|
|
|
284
287
|
@property
|
|
285
288
|
def model_label(self) -> str:
|
|
286
|
-
"""What the user sees: "Euron model", or the
|
|
289
|
+
"""What the user sees: "Euron model", or the user's own model's real name."""
|
|
287
290
|
from euron_code import llm as _llm
|
|
288
|
-
return _llm.
|
|
291
|
+
return _llm.euron_label(self.model) if self.uses_euron else str(getattr(self.llm, "label", None) or self.model)
|
|
292
|
+
|
|
293
|
+
@property
|
|
294
|
+
def model_identity(self) -> str:
|
|
295
|
+
"""Who answers, as the model is told (prompts.CORE): the Euron model never takes a vendor's name; the
|
|
296
|
+
user's own model is named as it is."""
|
|
297
|
+
from euron_code import llm as _llm
|
|
298
|
+
return _llm.identity(self.model, self.uses_euron, str(getattr(self.llm, "label", None) or ""))
|
|
289
299
|
|
|
290
300
|
def set_model(self, model: str, backend, window: Optional[int] = None, max_output: Optional[int] = None) -> None:
|
|
291
301
|
"""Switch who answers (the next model call uses it). The conversation is kept: it is stored in one
|
|
292
302
|
neutral format and converted per provider."""
|
|
293
303
|
old = self.llm
|
|
304
|
+
changed = model != self.model
|
|
294
305
|
self.llm = backend
|
|
295
306
|
self.model = model
|
|
307
|
+
if changed and len(self.messages) > 1 and not self.is_subagent:
|
|
308
|
+
# honest identity: the next message tells the model who is answering from now on
|
|
309
|
+
self.pending_note = f"[Euron Code: from now on the model answering is {self.model_identity}.]"
|
|
296
310
|
if window:
|
|
297
311
|
self.window = int(window)
|
|
298
312
|
self.settings["contextWindow"] = int(window)
|
|
@@ -512,7 +526,7 @@ class Agent:
|
|
|
512
526
|
text = self.pending_note + "\n\n" + text
|
|
513
527
|
self.pending_note = None
|
|
514
528
|
if len(self.messages) == 1 and not self.is_subagent:
|
|
515
|
-
text = prompts.dynamic_context(self.root, _branch(self.root)) + "\n\n" + text
|
|
529
|
+
text = prompts.dynamic_context(self.root, _branch(self.root), self.model_identity) + "\n\n" + text
|
|
516
530
|
# volatile additions go at the END of the message, so everything before stays cacheable
|
|
517
531
|
if self.pending_context:
|
|
518
532
|
text += "\n\n" + "\n\n".join(self.pending_context)
|
|
@@ -987,6 +1001,23 @@ class Agent:
|
|
|
987
1001
|
f"{self.context_usage():,} tokens est.).")
|
|
988
1002
|
return cut
|
|
989
1003
|
|
|
1004
|
+
def _gateway_note(self, info: Dict[str, Any]) -> None:
|
|
1005
|
+
"""A note from the Euron gateway on a stream chunk (for example a step ran on the Euron model instead
|
|
1006
|
+
of the one asked for). Shown once per kind per session."""
|
|
1007
|
+
notice = info.get("notice") if isinstance(info.get("notice"), dict) else None
|
|
1008
|
+
if not notice:
|
|
1009
|
+
return
|
|
1010
|
+
key = str(notice.get("code") or "notice")
|
|
1011
|
+
if key in self._notices_shown:
|
|
1012
|
+
return
|
|
1013
|
+
self._notices_shown.add(key)
|
|
1014
|
+
msg = str(notice.get("message") or "").strip()
|
|
1015
|
+
if msg and not self.is_subagent:
|
|
1016
|
+
try:
|
|
1017
|
+
self.ui.warn(msg)
|
|
1018
|
+
except Exception:
|
|
1019
|
+
pass
|
|
1020
|
+
|
|
990
1021
|
def _wait(self, seconds: float, message: str) -> None:
|
|
991
1022
|
self.ui.end_response()
|
|
992
1023
|
self._phase(f"{message.rstrip('.')} - retrying in {seconds:.0f}s")
|
|
@@ -1112,6 +1143,8 @@ class Agent:
|
|
|
1112
1143
|
r.usage = chunk["usage"]
|
|
1113
1144
|
if isinstance(chunk.get("_provider_message"), dict):
|
|
1114
1145
|
r.extra = chunk["_provider_message"]
|
|
1146
|
+
if isinstance(chunk.get("euron"), dict):
|
|
1147
|
+
self._gateway_note(chunk["euron"])
|
|
1115
1148
|
for choice in chunk.get("choices") or []:
|
|
1116
1149
|
delta = choice.get("delta") or {}
|
|
1117
1150
|
reasoning = delta.get("reasoning") or delta.get("reasoning_content")
|
|
@@ -2107,6 +2140,10 @@ class Agent:
|
|
|
2107
2140
|
def _run_hooks(self, event: str, payload: Dict[str, Any], tool_name: Optional[str] = None):
|
|
2108
2141
|
if self.hooks is None:
|
|
2109
2142
|
return []
|
|
2143
|
+
if self.is_subagent:
|
|
2144
|
+
from euron_code.hooks import TOOL_EVENTS
|
|
2145
|
+
if event not in TOOL_EVENTS: # session / prompt / stop hooks belong to the main agent's turn
|
|
2146
|
+
return []
|
|
2110
2147
|
results = self.hooks.run(event, payload, tool_name)
|
|
2111
2148
|
for r in results:
|
|
2112
2149
|
if r.code not in (0, 2):
|
|
@@ -2631,7 +2668,7 @@ class Agent:
|
|
|
2631
2668
|
try:
|
|
2632
2669
|
sub = Agent(self.client, sub_ui, self.root, self.settings, self.permissions, self.model,
|
|
2633
2670
|
is_subagent=True, max_turns=SUBAGENT_STEPS[mode], llm=llm, subagent_mode=mode,
|
|
2634
|
-
write_scope=scope)
|
|
2671
|
+
write_scope=scope, hooks=self.hooks)
|
|
2635
2672
|
sub.window, sub.max_output = self.window, self.max_output
|
|
2636
2673
|
sub.cancel = self.cancel
|
|
2637
2674
|
sub.on_session_in_use = self.on_session_in_use
|
|
@@ -64,9 +64,10 @@ def main_parser() -> argparse.ArgumentParser:
|
|
|
64
64
|
p.add_argument("--output-format", choices=["text", "json"], default="text", help="With -p: text or json.")
|
|
65
65
|
p.add_argument("--max-turns", type=_positive_int, default=None, help="Maximum model steps for this run.")
|
|
66
66
|
p.add_argument("--model", default=None,
|
|
67
|
-
help="Who answers: euron (the Euron model, the default) or your own model
|
|
68
|
-
"e.g. openai:<model>, anthropic:<model>,
|
|
69
|
-
"`euron models add
|
|
67
|
+
help="Who answers: euron (the Euron model on Euron's own GPUs, the default) or your own model "
|
|
68
|
+
"as provider:model, e.g. openai:<model>, anthropic:<model>, openrouter:<model>, "
|
|
69
|
+
"ollama:<model>, or a custom endpoint added with `euron models add` (your key, billed by "
|
|
70
|
+
"your provider).")
|
|
70
71
|
p.add_argument("-c", "--continue", dest="cont", action="store_true", help="Continue the latest session in this folder.")
|
|
71
72
|
p.add_argument("-r", "--resume", nargs="?", const="", default=None, metavar="ID",
|
|
72
73
|
help="Resume a session (pick from a list, or give an id).")
|
|
@@ -293,30 +294,57 @@ def run_models(ui, args) -> int:
|
|
|
293
294
|
if not args.name:
|
|
294
295
|
ui.error("Which model? e.g. `euron models use openai:<model>`, or `euron models use euron`.")
|
|
295
296
|
return EXIT_USAGE
|
|
296
|
-
|
|
297
|
+
name = args.name
|
|
298
|
+
short = llm.resolve_euron_shortcut(name.split(":", 1)[-1] if name.lower().startswith("euron:") else name)
|
|
299
|
+
if short is not None:
|
|
300
|
+
name = "euron:" + short if short else "euron"
|
|
301
|
+
ref = llm.parse(name)
|
|
297
302
|
if not ref.is_euron:
|
|
298
303
|
try:
|
|
299
304
|
llm.provider_config(ref.provider)
|
|
300
305
|
except llm.ProviderError as e:
|
|
301
306
|
ui.error(e.message)
|
|
302
307
|
return EXIT_USAGE
|
|
303
|
-
setup.set_default(str(ref) if not ref.is_euron else "euron")
|
|
308
|
+
setup.set_default(str(ref) if not ref.is_euron or ref.model else "euron")
|
|
304
309
|
ui.info(f"Default model: {llm.display_name(ref)}.")
|
|
305
310
|
return EXIT_OK
|
|
306
311
|
rows = setup.describe()
|
|
307
312
|
current = config.load_user_settings().get("model")
|
|
313
|
+
gw: list = []
|
|
314
|
+
try: # the Euron models from the gateway; offline or logged out: one generic row
|
|
315
|
+
client = _need_client(ui)
|
|
316
|
+
try:
|
|
317
|
+
gw = llm.sort_euron_models([m for m in client.models() if m.get("display_name")])
|
|
318
|
+
finally:
|
|
319
|
+
client.close()
|
|
320
|
+
llm.remember_euron_models(gw)
|
|
321
|
+
except api.EuronError:
|
|
322
|
+
gw = []
|
|
308
323
|
if args.json:
|
|
309
|
-
print(json.dumps({"default": llm.display_name(current), "
|
|
310
|
-
{"model":
|
|
324
|
+
print(json.dumps({"default": llm.display_name(current), "euron": [
|
|
325
|
+
{"model": "euron:" + str(m["id"]), "label": llm.euron_label(str(m["id"])), "kind": m.get("kind"),
|
|
326
|
+
"accountDefault": bool(m.get("is_default"))} for m in gw],
|
|
327
|
+
"models": [{"model": r, "note": n} for r, n in rows]}, indent=2))
|
|
311
328
|
return EXIT_OK
|
|
312
329
|
ui.info(f"Default: [bold]{llm.display_name(current)}[/bold]")
|
|
313
|
-
|
|
314
|
-
|
|
330
|
+
cur_ref = llm.parse(current)
|
|
331
|
+
if gw:
|
|
332
|
+
for m in gw:
|
|
333
|
+
mid = str(m["id"])
|
|
334
|
+
on = cur_ref.is_euron and (cur_ref.model == mid or (not cur_ref.model and m.get("is_default")))
|
|
335
|
+
ui.plain(f" {'*' if on else ' '} euron:{mid} {llm.euron_label(mid)}"
|
|
336
|
+
+ (", on Euron's own GPUs" if m.get("kind", "open") == "open" else "")
|
|
337
|
+
+ (" (default)" if m.get("is_default") else ""))
|
|
338
|
+
ui.dim("The Euron model is included with Euron Plus / Super 30.")
|
|
339
|
+
else:
|
|
340
|
+
mark = "*" if llm.is_euron(current) else " "
|
|
341
|
+
ui.plain(f" {mark} euron {llm.EURON_LABEL}, on Euron's own GPUs (default; Euron Plus / Super 30)")
|
|
315
342
|
for ref, note in rows:
|
|
316
343
|
ui.plain(f" {'*' if ref == current else ' '} {ref} {note}")
|
|
317
344
|
if not rows:
|
|
318
345
|
ui.dim("No models of your own yet. Add one with `euron models add` (OpenAI, Claude, Ollama, Gemini, "
|
|
319
|
-
"OpenRouter, Groq, or any OpenAI-compatible endpoint)."
|
|
346
|
+
"OpenRouter, Groq, or any OpenAI-compatible endpoint). Your own model uses your key and is "
|
|
347
|
+
"billed by your provider, not by Euron.")
|
|
320
348
|
else:
|
|
321
349
|
ui.dim("Switch with `euron models use <model>` or `euron --model <model>`; in a session, /model.")
|
|
322
350
|
return EXIT_OK
|
|
@@ -661,7 +689,9 @@ def choose_model(ui, args, settings, me, entitled: bool, interactive: bool):
|
|
|
661
689
|
ui.exact(api.NO_PLUS_BYO_MESSAGE)
|
|
662
690
|
return EXIT_NO_PLUS
|
|
663
691
|
if ref.is_euron:
|
|
664
|
-
|
|
692
|
+
short = llm.resolve_euron_shortcut(ref.model) if ref.model else None
|
|
693
|
+
model = (short if short is not None else ref.model) or me.get("defaultModel") or "euron-coder"
|
|
694
|
+
return model, None
|
|
665
695
|
try:
|
|
666
696
|
backend = llm.make_backend(ref, settings)
|
|
667
697
|
except llm.MissingKeyError as e:
|
|
@@ -694,6 +724,7 @@ def apply_model_limits(client, settings, model: str) -> None:
|
|
|
694
724
|
models = client.models()
|
|
695
725
|
except api.EuronError:
|
|
696
726
|
return
|
|
727
|
+
llm.remember_euron_models(models)
|
|
697
728
|
m = next((x for x in models if x.get("id") == model), None)
|
|
698
729
|
if not m:
|
|
699
730
|
return
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
A model reference is ``provider:model`` (``openai:gpt-5.1``, ``anthropic:claude-sonnet-5-5``,
|
|
4
4
|
``ollama:llama3.1:8b``, ``groq:llama-3.3-70b-versatile``). A reference without a provider, or ``euron``,
|
|
5
|
-
is the Euron model
|
|
6
|
-
|
|
5
|
+
is the Euron model: Euron's own model, run by Euron on its own GPUs, served by Euron's gateway. It is the
|
|
6
|
+
default and the only model Euron pays for. Any other model (OpenAI, Anthropic, OpenRouter, Groq, Gemini, Ollama,
|
|
7
|
+
any OpenAI-compatible endpoint) is the user's own, with the user's own key, billed by that provider.
|
|
8
|
+
``euron:default`` / ``euron:open`` are shortcuts for the Euron model.
|
|
7
9
|
|
|
8
10
|
Providers come from built-in presets (PRESETS) merged with the user's own ``providers`` block in
|
|
9
11
|
~/.euron/settings.json (written by ``euron models add`` / ``/model add``). API keys come from the
|
|
@@ -22,6 +24,10 @@ from euron_code import api
|
|
|
22
24
|
|
|
23
25
|
EURON = "euron"
|
|
24
26
|
EURON_LABEL = "Euron model"
|
|
27
|
+
#: gateway models seen this run: id -> {"label", "kind", ...} (from /v1/models, see remember_euron_models)
|
|
28
|
+
_EURON_MODELS: Dict[str, Dict[str, Any]] = {}
|
|
29
|
+
#: shortcuts for the gateway's models: kind / role -> how to find the id
|
|
30
|
+
EURON_SHORTCUTS = ("default", "fast", "open")
|
|
25
31
|
#: Euron Plus / Super 30 only. Any signed-in Euron account may use its own model.
|
|
26
32
|
NEEDS_PLUS_MESSAGE = ("The Euron model needs Euron Plus or Super 30 (https://euron.one/plus). You can use your own "
|
|
27
33
|
"model instead: run /model add (or `euron models add`).")
|
|
@@ -109,10 +115,78 @@ def parse(ref: Optional[str]) -> ModelRef:
|
|
|
109
115
|
return ModelRef(EURON, s)
|
|
110
116
|
|
|
111
117
|
|
|
118
|
+
#: what the self-hosted model was called before 1.5.1 / gateway label "Euron model" (2026-11-09)
|
|
119
|
+
_OLD_OPEN_LABEL = re.compile(r"^euron open", re.I)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def remember_euron_models(models: List[Dict[str, Any]]) -> None:
|
|
123
|
+
"""Keep the gateway's model list (labels, kinds) for display. Older gateways send no labels."""
|
|
124
|
+
for m in models or []:
|
|
125
|
+
mid = str(m.get("id") or "")
|
|
126
|
+
if not mid:
|
|
127
|
+
continue
|
|
128
|
+
kind = str(m.get("kind") or "")
|
|
129
|
+
label = str(m.get("display_name") or m.get("label") or "")
|
|
130
|
+
if kind == "open" and (not label or _OLD_OPEN_LABEL.match(label)):
|
|
131
|
+
label = EURON_LABEL # Euron's own model on Euron's GPUs is simply "Euron model"
|
|
132
|
+
_EURON_MODELS[mid] = {"label": label, "kind": kind, "default": bool(m.get("is_default"))}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def euron_kind(model_id: str = "") -> str:
|
|
136
|
+
""""open" (Euron's own model on Euron's GPUs, also for an unknown id or an older gateway) or "hosted"."""
|
|
137
|
+
if not model_id:
|
|
138
|
+
model_id = next((k for k, v in _EURON_MODELS.items() if v.get("default")), "")
|
|
139
|
+
return str((_EURON_MODELS.get(model_id) or {}).get("kind") or "open")
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def sort_euron_models(models: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
|
|
143
|
+
"""The Euron model (kind open) first, then anything else the gateway lists."""
|
|
144
|
+
return sorted(models or [], key=lambda m: 0 if str(m.get("kind") or "open") == "open" else 1)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def identity(model_id: str, uses_euron: bool, byo_label: str = "") -> str:
|
|
148
|
+
"""Who answers, for the model itself (honest identity, see prompts.CORE): the Euron model never claims a
|
|
149
|
+
vendor's name; the user's own model is named as it is."""
|
|
150
|
+
if not uses_euron:
|
|
151
|
+
return f"{byo_label or model_id} (the user's own model, with the user's own API key)"
|
|
152
|
+
if euron_kind(model_id) == "hosted":
|
|
153
|
+
return euron_label(model_id)
|
|
154
|
+
return f"{EURON_LABEL} (Euron's own model, run by Euron on Euron's own GPUs)"
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def euron_models() -> Dict[str, Dict[str, Any]]:
|
|
158
|
+
return dict(_EURON_MODELS)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def euron_label(model_id: str = "") -> str:
|
|
162
|
+
"""The label for a gateway model id ("" = the account default), else "Euron model"."""
|
|
163
|
+
if not model_id:
|
|
164
|
+
model_id = next((k for k, v in _EURON_MODELS.items() if v.get("default")), "")
|
|
165
|
+
info = _EURON_MODELS.get(model_id) or {}
|
|
166
|
+
return info.get("label") or EURON_LABEL
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def resolve_euron_shortcut(name: str, models: Optional[List[Dict[str, Any]]] = None) -> Optional[str]:
|
|
170
|
+
"""`open` -> the Euron model (self-hosted), `default` -> "" (the account default), `fast` -> a gateway model
|
|
171
|
+
whose id ends in -fast (none is offered today, so it ends as "not available"); None if `name` is not a
|
|
172
|
+
shortcut. Uses the gateway's list (kinds, ids), so new ids need no CLI change."""
|
|
173
|
+
n = (name or "").strip().lower()
|
|
174
|
+
if n not in EURON_SHORTCUTS:
|
|
175
|
+
return None
|
|
176
|
+
if n == "default":
|
|
177
|
+
return ""
|
|
178
|
+
if models is not None:
|
|
179
|
+
remember_euron_models(models)
|
|
180
|
+
items = list(_EURON_MODELS.items())
|
|
181
|
+
if n == "fast":
|
|
182
|
+
return next((k for k, _ in items if k == "euron-fast" or k.endswith("-fast")), "euron-fast")
|
|
183
|
+
return next((k for k, v in items if v.get("kind") == "open"), "euron-coder")
|
|
184
|
+
|
|
185
|
+
|
|
112
186
|
def display_name(ref: Any) -> str:
|
|
113
|
-
"""What the user sees:
|
|
187
|
+
"""What the user sees: "Euron model" (or the gateway's label), the real name for the user's own model."""
|
|
114
188
|
r = ref if isinstance(ref, ModelRef) else parse(ref)
|
|
115
|
-
return
|
|
189
|
+
return euron_label(r.model) if r.is_euron else f"{r.provider}:{r.model}"
|
|
116
190
|
|
|
117
191
|
|
|
118
192
|
def is_euron(ref: Any) -> bool:
|
|
@@ -59,7 +59,10 @@ def save_provider(name: str, entry: Dict[str, Any], model: Optional[str] = None,
|
|
|
59
59
|
|
|
60
60
|
def set_default(ref: str) -> None:
|
|
61
61
|
data = config.load_user_settings()
|
|
62
|
-
|
|
62
|
+
r = llm.parse(ref)
|
|
63
|
+
if r.is_euron and r.model: # a specific Euron model (euron-fast, euron-coder): kept by its gateway id
|
|
64
|
+
data["model"] = r.model
|
|
65
|
+
elif r.is_euron: # the account default
|
|
63
66
|
data.pop("model", None)
|
|
64
67
|
else:
|
|
65
68
|
data["model"] = ref
|
|
@@ -88,7 +91,9 @@ def describe(settings: Optional[Dict[str, Any]] = None) -> List[Tuple[str, str]]
|
|
|
88
91
|
_key, where = llm.find_key(r.provider, cfg)
|
|
89
92
|
note = "no key needed" if cfg.get("noKey") and where == "none" else (
|
|
90
93
|
f"key: {where}" if where != "none" else "no key yet (/model add)")
|
|
91
|
-
|
|
94
|
+
who = cfg.get('label') or r.provider
|
|
95
|
+
billed = "" if cfg.get("noKey") else f", your own key, billed by {who}"
|
|
96
|
+
note = f"{who}, {note}{billed}"
|
|
92
97
|
except llm.ProviderError as e:
|
|
93
98
|
note = e.message
|
|
94
99
|
out.append((ref, note))
|
|
@@ -121,7 +126,7 @@ def add_interactive(ui, settings: Optional[Dict[str, Any]] = None, provider: Opt
|
|
|
121
126
|
name = (provider or "").strip().lower()
|
|
122
127
|
if not name:
|
|
123
128
|
ui.info("Add your own model. It answers instead of the Euron model; its API key stays on this computer "
|
|
124
|
-
"and is only sent to that provider.")
|
|
129
|
+
"and is only sent to that provider. Your provider bills you for it; Euron does not.")
|
|
125
130
|
for i, (_k, label) in enumerate(CHOICES, 1):
|
|
126
131
|
ui.plain(f" {i}. {label}")
|
|
127
132
|
ans = _ask(ui, "Provider [1-7]: ")
|
|
@@ -49,7 +49,7 @@ CORE = """You are Euron Code, an AI coding agent that works inside the user's pr
|
|
|
49
49
|
- When you finish, summarise in a few lines what you changed (files, why) and how you verified it (command and result). Say plainly what you could not verify; never claim a check you did not run.
|
|
50
50
|
- If the request is ambiguous or risky, ask one clear question instead of guessing.
|
|
51
51
|
- Use Markdown sparingly: short paragraphs, `code` for names and paths, fenced blocks for code.
|
|
52
|
-
- If asked which AI model you are: you are Euron Code, running the model
|
|
52
|
+
- If asked which AI model you are: you are Euron Code, running the model named under "Model:" in the <context> block (or in a later "[Euron Code: ... the model answering is ...]" note). If that is the Euron model, say you run on the Euron model, Euron's own model hosted by Euron on its own GPUs, and never claim to be another company's model or name one. If it is the user's own model, name that model plainly, with its vendor. Do not guess any other model, vendor or hardware."""
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
SUBAGENT = """You are a read-only research sub-agent for Euron Code. You have read_file, list_dir, glob and grep, and nothing else: you cannot edit files or run commands.
|
|
@@ -219,9 +219,11 @@ def build_system_prompt(root: Path, shell_kind: str, memory_text: str, subagent:
|
|
|
219
219
|
return "\n\n".join(parts)
|
|
220
220
|
|
|
221
221
|
|
|
222
|
-
def dynamic_context(root: Path, branch: Optional[str]) -> str:
|
|
222
|
+
def dynamic_context(root: Path, branch: Optional[str], model_label: Optional[str] = None) -> str:
|
|
223
223
|
today = _dt.date.today().isoformat()
|
|
224
224
|
lines = [f"Today's date: {today}."]
|
|
225
|
+
if model_label:
|
|
226
|
+
lines.append(f"Model: {model_label}.")
|
|
225
227
|
if branch:
|
|
226
228
|
lines.append(f"Git branch: {branch}.")
|
|
227
229
|
return "<context>\n" + "\n".join(lines) + "\n</context>"
|