fix(module-model-loader): use f-strings so loguru interpolates values#1007
Open
Dr0p42 wants to merge 1 commit into
Open
fix(module-model-loader): use f-strings so loguru interpolates values#1007Dr0p42 wants to merge 1 commit into
Dr0p42 wants to merge 1 commit into
Conversation
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).
Deploying abi-docs with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The four
logger.*calls inModuleModelLoaderwere using stdlib%s-style format strings with positional args. loguru doesn't substitute%splaceholders, so output looked like:…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
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).