Skip to content

[codex] Fix Ollama package import regression#9

Draft
kristoffersodersten wants to merge 2 commits into
mainfrom
codex/fix-ollama-package-import-test-gap
Draft

[codex] Fix Ollama package import regression#9
kristoffersodersten wants to merge 2 commits into
mainfrom
codex/fix-ollama-package-import-test-gap

Conversation

@kristoffersodersten
Copy link
Copy Markdown
Owner

What changed

  • fixed the remaining package-relative import in server/ollama_client.py so runtime profile resolution works when importing server.ollama_client
  • added a focused regression test covering package import initialization and runtime-profile model selection

Why

The recent import-path cleanup switched top-level imports to the server.* package, but OllamaClient.__init__ still used from runtime_profiles import ... inside a guarded block. In package-import mode that import failed silently, causing a fallback to generic default models instead of the recommended runtime profile.

Impact

  • package imports now honor runtime-profile defaults consistently
  • the regression is covered by a small server-side unit test

Validation

  • pnpm lint
  • pnpm test

kristoffersodersten and others added 2 commits March 31, 2026 19:37
- Added __init__.py files to all server subdirectories (intent, model, operations, runtime, task) to enable proper Python package imports
- Fixed import statements in server modules (ollama_client, nano_server, runtime_profiles) to use absolute imports
- Updated eslint.config.js to support .mjs files with Node.js globals for scripts
- All TypeScript builds successfully, ESLint passes (0 errors), and all tests pass (28/28)
- Python modules now import correctly without ModuleNotFoundError

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant