Skip to content

chore: remove unused json_default function from llmchat_router#2619

Merged
crivetimihai merged 1 commit intoIBM:mainfrom
jonathan-fulton:fix/remove-unused-json-default
Jan 31, 2026
Merged

chore: remove unused json_default function from llmchat_router#2619
crivetimihai merged 1 commit intoIBM:mainfrom
jonathan-fulton:fix/remove-unused-json-default

Conversation

@jonathan-fulton
Copy link
Copy Markdown
Contributor

Summary

Removes the unused json_default function from llmchat_router.py.

Problem

The json_default function was defined but never called anywhere in the code. It only appeared in docstring examples but was never actually used for JSON serialization.

Solution

Remove the dead code to reduce maintenance burden.

Fixes #2372

@jonathan-fulton jonathan-fulton force-pushed the fix/remove-unused-json-default branch from 17f234e to 194bde5 Compare January 31, 2026 18:39
@crivetimihai crivetimihai self-assigned this Jan 31, 2026
@crivetimihai crivetimihai added this to the Release 1.0.0-RC1 milestone Jan 31, 2026
@crivetimihai
Copy link
Copy Markdown
Member

Thanks @jonathan-fulton! Confirmed this is dead code - the sse function uses orjson.dumps() which has its own serialization, so this custom json_default helper was never called. Good cleanup. I'll start merging and rebasing.

The json_default function was defined but never called in the code.
It only appeared in docstring examples but was never used.
Removing dead code to reduce maintenance burden.

Fixes IBM#2372

Signed-off-by: Jonathan Fulton <jonathan@jonathanfulton.com>
@crivetimihai crivetimihai force-pushed the fix/remove-unused-json-default branch from 194bde5 to 41a6a5b Compare January 31, 2026 20:51
@crivetimihai crivetimihai merged commit 71178f4 into IBM:main Jan 31, 2026
51 checks passed
hughhennelly pushed a commit to hughhennelly/mcp-context-forge that referenced this pull request Feb 8, 2026
)

The json_default function was defined but never called in the code.
It only appeared in docstring examples but was never used.
Removing dead code to reduce maintenance burden.

Fixes IBM#2372

Signed-off-by: Jonathan Fulton <jonathan@jonathanfulton.com>
Signed-off-by: hughhennnelly <hughhennelly06@gmail.com>
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
)

The json_default function was defined but never called in the code.
It only appeared in docstring examples but was never used.
Removing dead code to reduce maintenance burden.

Fixes IBM#2372

Signed-off-by: Jonathan Fulton <jonathan@jonathanfulton.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.

[CLEANUP][SONAR][LOW]: Dead code - unused function json_default in llmchat_router.py

2 participants