diff --git a/config.json b/config.json index 875a216..2b4b3b2 100644 --- a/config.json +++ b/config.json @@ -1,8 +1,8 @@ { "model": null, "max_iters": 50, - "lm": "openrouter/openai/gpt-5.2-codex", - "sub_lm": "openrouter/openai/gpt-5-mini", + "lm": "openrouter/anthropic/claude-opus-4.5", + "sub_lm": "openrouter/qwen/qwen-coder", "api_base": "https://openrouter.ai/api/v1", "max_tokens": 50000, "max_output_chars": 100000, diff --git a/nanocode.py b/nanocode.py index a331a05..22b4de9 100644 --- a/nanocode.py +++ b/nanocode.py @@ -40,7 +40,7 @@ def read_file(path: str, offset: int = 0, limit: int = None) -> str: selected = lines[offset : offset + limit] content = "".join(f"{offset + idx + 1:4}| {line}" for idx, line in enumerate(selected)) tokens = len(content) // 4 # ~4 chars per token estimate - print(f"{MAGENTA}⏺ Reading file: {path} (~{tokens:,} tokens){RESET}") + print(f"{MAGENTA}⏺ Reading file({path}) (~{tokens:,} tokens){RESET}") return content @@ -67,7 +67,7 @@ def write_file(path: str, content: str) -> str: lines = content.count("\n") + (1 if content and not content.endswith("\n") else 0) tokens = len(content) // 4 - print(f"{MAGENTA}⏺ {action} file: {path} ({lines} lines, ~{tokens:,} tokens){RESET}") + print(f"{MAGENTA}⏺ {action} file({path}) ({lines} lines, ~{tokens:,} tokens){RESET}") return f"ok: wrote {lines} lines ({tokens:,} tokens) to {path}" @@ -83,7 +83,7 @@ def edit_file(path: str, old: str, new: str, replace_all: bool = False) -> str: Returns: 'ok' on success, error message on failure """ - print(f"{MAGENTA}⏺ Editing file: {path}{RESET}") + print(f"{MAGENTA}⏺ Edit({path}){RESET}") text = open(path).read() if old not in text: @@ -109,7 +109,7 @@ def glob_files(pattern: str, path: str = ".") -> str: Returns: Newline-separated list of matching files """ - print(f"{MAGENTA}⏺ Glob: {pattern}{RESET}") + print(f"{MAGENTA}⏺ Glob({pattern}): {path}{RESET}") cmd = ["rg", "--files", "-g", pattern, path] try: @@ -228,8 +228,8 @@ Do NOT confuse REPL variables with external files. Reading a file into a variabl class RLMCodingConfig(PrecompiledConfig): max_iters: int = 50 - lm: str = "openrouter/openai/gpt-5.2-codex" - sub_lm: str = "openrouter/openai/gpt-5-mini" + lm: str = "openrouter/anthropic/claude-opus-4.5" + sub_lm: str = "openrouter/qwen/qwen-coder" api_base: str = "https://openrouter.ai/api/v1" max_tokens: int = 50000 max_output_chars: int = 100000 @@ -420,4 +420,3 @@ if __name__ == "__main__": branch=branch, ) - diff --git a/program.json b/program.json index c956880..55b99ac 100644 --- a/program.json +++ b/program.json @@ -29,7 +29,7 @@ ] }, "lm": { - "model": "openrouter/openai/gpt-5.2-codex", + "model": "openrouter/anthropic/claude-opus-4.5", "model_type": "chat", "cache": true, "num_retries": 3, @@ -64,7 +64,7 @@ ] }, "lm": { - "model": "openrouter/openai/gpt-5.2-codex", + "model": "openrouter/anthropic/claude-opus-4.5", "model_type": "chat", "cache": true, "num_retries": 3, diff --git a/pyproject.toml b/pyproject.toml index 034abc9..a7e5a33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,4 +4,4 @@ version = "0.1.0" description = "Add your description here" readme = "README.md" requires-python = ">=3.13" -dependencies = ["dspy>=3.1.2", "fastmcp>=2.14.3", "mcp2py>=0.6.0", "modaic>=0.10.4"] +dependencies = ["dspy>=3.1.2", "fastmcp>=2.14.3", "mcp2py>=0.6.0", "modaic>=0.10.4", "weave>=0.52.25"]