You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove unused Granite32/33 formatter processors from public API #1304
`mellea/formatters/granite/granite3/` contains `Granite32InputProcessor`, `Granite32OutputProcessor`, `Granite32ChatCompletion`, `Granite33InputProcessor`, `Granite33OutputProcessor`, and `Granite33ChatCompletion`, all re-exported from `mellea/formatters/granite/init.py`.
In discussion #1166, @jakelorocco confirmed these classes are not used by any active Mellea code path. Mellea works at the level of actions and contexts via intrinsic processors — the `Granite3x` chat formatter pipeline was carried over from `granite-common` (#571) but never wired into any backend or session routing.
No documentation references them. Nothing in `mellea/` outside the formatter package itself uses them.
Keeping them in `all` is misleading — they look like a supported way to work with Granite models when they are not.
Related: PR #1165 was closed as a result of this finding — the tests targeted code that should go.
other than docs we could use the warnings.warn(DeprecationWarning, stacklevel=2) in __init__ pattern. - though it's silenced by defaults. Or we could use PEP 702 @warnings.deprecated . Ok to go with consensus - but given the code was never documented I'm wondering if unnecessary
I am fine with removing these. The person who implements this should check with @frreiss or someone from the granite-library team to ensure it's okay to remove.
After reviewing the discussion history and checking with @frreiss and @jakelorocco, I'm going with direct removal rather than a deprecation cycle.
Rationale: These classes were never wired into any backend or session routing — there is no production caller to protect. @frreiss (who wrote this code) has signed off on removal, satisfying @jakelorocco's condition. Adding deprecation shims and warning-firing tests would be investment in code with no users; PR #1165 was already closed to avoid exactly that.
Source deletions
Entire granite3/ subtree becomes dead once the subdirs go:
mellea/formatters/granite/granite3/input.py — Granite3InputProcessor, only used by granite32/33
mellea/formatters/granite/granite3/output.py — output helpers, only used by granite32/33
mellea/formatters/granite/granite3/constants.py — only used by granite32/33
mellea/formatters/granite/granite3/types.py — Granite3Controls etc, only used by granite32/33 and the dying tests
mellea/formatters/granite/granite3/__init__.py
mellea/formatters/granite/__init__.py — remove the six Granite32*/Granite33* imports and their __all__ entries.
Test deletions
Five test files go. Note: test_granite33_output.py was missing from the issue body — it exists and must also be removed.
test_granite32_input.py
test_granite32_output.py
test_granite33_input.py
test_granite33_output.py ← not listed in issue, but present
test_granite3_shared.py — mostly granite3 output tests, but contains TestNltkCheck (covers base.optional.nltk_check) which has no other coverage
Rescue:TestNltkCheck is extracted into a new test/formatters/granite/base/test_base_optional.py before the shared file is deleted. TestFindSubstringInText in the shared file is redundant with test_base_util.py and is dropped.
Activity
psschwei commentedon Jun 19, 2026
+1
I would deprecate for a release or two just in case and turn off any testing of them until we decide to remove.
planetf1 commentedon Jun 22, 2026
other than docs we could use the
warnings.warn(DeprecationWarning, stacklevel=2) in __init__pattern. - though it's silenced by defaults. Or we could use PEP 702@warnings.deprecated. Ok to go with consensus - but given the code was never documented I'm wondering if unnecessaryjakelorocco commentedon Jun 22, 2026
I am fine with removing these. The person who implements this should check with @frreiss or someone from the granite-library team to ensure it's okay to remove.
frreiss commentedon Jun 22, 2026
I am also fine with removing these.
planetf1 commentedon Jun 24, 2026
Proposed approach: direct removal
After reviewing the discussion history and checking with @frreiss and @jakelorocco, I'm going with direct removal rather than a deprecation cycle.
Rationale: These classes were never wired into any backend or session routing — there is no production caller to protect. @frreiss (who wrote this code) has signed off on removal, satisfying @jakelorocco's condition. Adding deprecation shims and warning-firing tests would be investment in code with no users; PR #1165 was already closed to avoid exactly that.
Source deletions
Entire
granite3/subtree becomes dead once the subdirs go:mellea/formatters/granite/granite3/granite32/(full subdir)mellea/formatters/granite/granite3/granite33/(full subdir)mellea/formatters/granite/granite3/input.py—Granite3InputProcessor, only used by granite32/33mellea/formatters/granite/granite3/output.py— output helpers, only used by granite32/33mellea/formatters/granite/granite3/constants.py— only used by granite32/33mellea/formatters/granite/granite3/types.py—Granite3Controlsetc, only used by granite32/33 and the dying testsmellea/formatters/granite/granite3/__init__.pymellea/formatters/granite/__init__.py— remove the sixGranite32*/Granite33*imports and their__all__entries.Test deletions
Five test files go. Note:
test_granite33_output.pywas missing from the issue body — it exists and must also be removed.test_granite32_input.pytest_granite32_output.pytest_granite33_input.pytest_granite33_output.py← not listed in issue, but presenttest_granite3_shared.py— mostly granite3 output tests, but containsTestNltkCheck(coversbase.optional.nltk_check) which has no other coverageRescue:
TestNltkCheckis extracted into a newtest/formatters/granite/base/test_base_optional.pybefore the shared file is deleted.TestFindSubstringInTextin the shared file is redundant withtest_base_util.pyand is dropped.refactor(formatters): remove unused Granite32/33 processor classes (g…
refactor(formatters): remove unused Granite32/33 processor classes (g…