From 10a2466bb81d784d556490d2886455d3d6b3e64d Mon Sep 17 00:00:00 2001 From: JNK234 Date: Thu, 13 Aug 2026 16:31:30 -0500 Subject: [PATCH 1/2] fix: standardise demo config filenames on config.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit color-sharing failed on setup: it passed "demos/config" to llm:load-config, which resolves against the model's own directory first, so the lookup became demos/color-sharing/demos/config and never matched. Its own config.txt sat beside it, unused. Three naming conventions were in use across five demos — "config", "config.txt", and a path-prefixed form. config.txt is the majority convention, so the two extensionless files are renamed to match. The extensionless name is also the blocker on #61, where the baba-is-ai library submission was rejected over it. - rename demos/baba-is-ai/config and demos/provider-sensitivity/config to config.txt; update both models to load the new name - point color-sharing at config.txt instead of demos/config - track demos/color-sharing/config.txt, which existed locally but was never committed — a fresh clone got a broken demo even with the path fixed - add .gitignore negations for the three files so the config-*.txt secret-protection pattern from #42 does not swallow them All three configs carry placeholder keys or local Ollama endpoints; no secrets are added. Verified: all three models compile headless against NetLogo 7.0.3, and the config-resolution check that flagged color-sharing now passes. Closes #66. --- .gitignore | 3 ++ demos/baba-is-ai/baba-is-ai.nlogox | 2 +- demos/baba-is-ai/{config => config.txt} | 0 demos/color-sharing/color-sharing.nlogox | 2 +- demos/color-sharing/config.txt | 28 +++++++++++++++++++ .../{config => config.txt} | 0 .../provider-sensitivity.nlogox | 2 +- 7 files changed, 34 insertions(+), 3 deletions(-) rename demos/baba-is-ai/{config => config.txt} (100%) create mode 100644 demos/color-sharing/config.txt rename demos/provider-sensitivity/{config => config.txt} (100%) diff --git a/.gitignore b/.gitignore index 40f86b9..9facfca 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,10 @@ commands/ # Local config files and secrets (keep demos/ checked in) config.txt config-*.txt +!demos/baba-is-ai/config.txt +!demos/color-sharing/config.txt !demos/provider-sensitivity/config-multi-provider.txt +!demos/provider-sensitivity/config.txt !demos/social-deduction-game/config.txt *.env *.env.* diff --git a/demos/baba-is-ai/baba-is-ai.nlogox b/demos/baba-is-ai/baba-is-ai.nlogox index f368501..86c8669 100644 --- a/demos/baba-is-ai/baba-is-ai.nlogox +++ b/demos/baba-is-ai/baba-is-ai.nlogox @@ -37,7 +37,7 @@ to setup set move-history [] carefully [ - llm:load-config "config" + llm:load-config "config.txt" set llm-config-loaded? true ] [ output-print (word "Config error: " error-message) diff --git a/demos/baba-is-ai/config b/demos/baba-is-ai/config.txt similarity index 100% rename from demos/baba-is-ai/config rename to demos/baba-is-ai/config.txt diff --git a/demos/color-sharing/color-sharing.nlogox b/demos/color-sharing/color-sharing.nlogox index ccb2993..e72cbb2 100644 --- a/demos/color-sharing/color-sharing.nlogox +++ b/demos/color-sharing/color-sharing.nlogox @@ -20,7 +20,7 @@ to setup clear-all ; Load LLM configuration - llm:load-config "demos/config" + llm:load-config "config.txt" set-default-shape turtles "person" diff --git a/demos/color-sharing/config.txt b/demos/color-sharing/config.txt new file mode 100644 index 0000000..9701de3 --- /dev/null +++ b/demos/color-sharing/config.txt @@ -0,0 +1,28 @@ +# NetLogo Multi-LLM Extension - Color Sharing Demo Configuration +# Configuration for the color sharing demo + +# ============================================================================= +# ACTIVE CONFIGURATION +# ============================================================================= + +# Choose your provider: openai, anthropic, gemini, ollama +provider=ollama + +# Choose your model (must match the provider above) +# OpenAI: gpt-4o-mini, gpt-4o, gpt-4-turbo, gpt-3.5-turbo +# Anthropic: claude-3-haiku-20240307, claude-3-sonnet-20240229, claude-3-opus-20240229 +# Gemini: gemini-1.5-flash, gemini-1.5-pro, gemini-pro +# Ollama: llama3.2, llama3.1, mistral, codellama (must be installed) +model=llama3.2:3b + +# API Key (required for openai, anthropic, gemini - not needed for ollama) +# IMPORTANT: Replace with your actual API key for cloud providers +api_key=YOUR_API_KEY_HERE + +# Generation settings +temperature=0.7 +max_tokens=200 +timeout_seconds=30 + +# For Ollama (local) +base_url=http://localhost:11434 \ No newline at end of file diff --git a/demos/provider-sensitivity/config b/demos/provider-sensitivity/config.txt similarity index 100% rename from demos/provider-sensitivity/config rename to demos/provider-sensitivity/config.txt diff --git a/demos/provider-sensitivity/provider-sensitivity.nlogox b/demos/provider-sensitivity/provider-sensitivity.nlogox index fd59aab..72a82a8 100644 --- a/demos/provider-sensitivity/provider-sensitivity.nlogox +++ b/demos/provider-sensitivity/provider-sensitivity.nlogox @@ -46,7 +46,7 @@ to setup ] [ output-print (word ">> Config load failed: " error-message) carefully [ - llm:load-config "config" + llm:load-config "config.txt" output-print ">> Loaded fallback config." ] [ output-print (word ">> Fallback config load failed: " error-message) From 3d977579594ac439277bd81103e2a490fb34674c Mon Sep 17 00:00:00 2001 From: JNK234 Date: Thu, 13 Aug 2026 17:27:28 -0500 Subject: [PATCH 2/2] docs: update baba-is-ai references to the renamed config.txt The rename updated the model's llm:load-config call but left three user-facing references pointing at the old extensionless name. The Info tab reference matters most: it ships inside the .nlogox, and #61 is a Models Library re-submission that was rejected over exactly this filename. A reviewer opening the Info tab would be told to edit a file that no longer exists. - demos/baba-is-ai/README.md: setup step and file table - demos/baba-is-ai/baba-is-ai.nlogox: Info tab Verified: model still compiles headless against NetLogo 7.0.3. --- demos/baba-is-ai/README.md | 4 ++-- demos/baba-is-ai/baba-is-ai.nlogox | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/baba-is-ai/README.md b/demos/baba-is-ai/README.md index 6f43ff4..107da9c 100644 --- a/demos/baba-is-ai/README.md +++ b/demos/baba-is-ai/README.md @@ -73,7 +73,7 @@ Expected: Very rarely solved -- demonstrates the knowing-doing gap ## Swapping Providers -Edit `config` to try different LLM providers: +Edit `config.txt` to try different LLM providers: ``` # OpenAI @@ -97,7 +97,7 @@ api_key=YOUR_KEY_HERE | File | Purpose | |------|---------| | `baba-is-ai.nlogox` | Main NetLogo model with rule engine, levels, and LLM integration | -| `config` | LLM provider configuration (defaults to local Ollama) | +| `config.txt` | LLM provider configuration (defaults to local Ollama) | | `action-template.yaml` | Documents the prompt format (not used at runtime -- `llm:choose` builds its own prompt) | | `README.md` | This file | diff --git a/demos/baba-is-ai/baba-is-ai.nlogox b/demos/baba-is-ai/baba-is-ai.nlogox index 86c8669..26bf9b6 100644 --- a/demos/baba-is-ai/baba-is-ai.nlogox +++ b/demos/baba-is-ai/baba-is-ai.nlogox @@ -732,7 +732,7 @@ A simplified recreation of "Baba Is You" where an LLM agent must solve puzzles b ### Extending -- Edit `config` to try different LLM providers (OpenAI, Claude, Gemini) +- Edit `config.txt` to try different LLM providers (OpenAI, Claude, Gemini) - Add new word types (DEFEAT, SINK) for more complex puzzles - Create levels where the agent must *construct* rules, not just break them