Skip to content

fix(module-model-loader): use f-strings so loguru interpolates values#1007

Open
Dr0p42 wants to merge 1 commit into
mainfrom
fix/module-model-loader-loguru-format
Open

fix(module-model-loader): use f-strings so loguru interpolates values#1007
Dr0p42 wants to merge 1 commit into
mainfrom
fix/module-model-loader-loguru-format

Conversation

@Dr0p42

@Dr0p42 Dr0p42 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The four logger.* calls in ModuleModelLoader were using stdlib %s-style format strings with positional args. loguru doesn't substitute %s placeholders, so output looked like:

ModuleModelLoader: registered %s.%s as %r (provider=%s).

…with the module path / class name / canonical id / provider silently dropped.

Changes

Switched all four calls (one debug, three warnings) to f-strings, matching the loguru style already used at line 40 of the same file.

Test plan

  • Run abi chat (or anything that boots the engine with the model registry) and confirm log lines now show real values, e.g.:
    ModuleModelLoader: registered naas_abi_marketplace.ai.chatgpt.models.gpt_4_1_mini.Gpt41Mini as 'gpt-4.1-mini' (provider=openai).
  • No behavior change beyond log formatting.

The four logger calls in ModuleModelLoader were passing stdlib
%s-style format strings with positional args. loguru does not
substitute %s placeholders, so the literal %s was appearing in
output (e.g. "registered %s.%s as %r (provider=%s).") and the
actual module path / class name / canonical id / provider were
silently dropped, making the log line useless for diagnostics.

Switch all four calls to f-strings to match the loguru style
already used elsewhere in the file (e.g. line 40).
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying abi-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 02b9621
Status: ✅  Deploy successful!
Preview URL: https://a84098b8.abi-docs-76c.pages.dev
Branch Preview URL: https://fix-module-model-loader-logu.abi-docs-76c.pages.dev

View logs

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