feat(discord): generate auto-thread titles - #3009
Closed
chhoumann wants to merge 5 commits into
Closed
Conversation
Author
|
In the future, it'd be super cool to learn the user's preference for the titles. I don't think memory or e.g. |
Author
|
Also, I realize using the default model may be overkill for generating a title. E.g. I'm using GPT 5.4, while a Mini or Haiku model would suffice. Ideally, the system would support configuring specific models for specific tasks, which would be useful system-wide. |
chhoumann
force-pushed
the
codex/discord-thread-titles
branch
3 times, most recently
from
March 31, 2026 14:24
1be9cc4 to
ac288ef
Compare
chhoumann
force-pushed
the
codex/discord-thread-titles
branch
from
April 3, 2026 14:42
ac288ef to
c8995cd
Compare
…titles # Conflicts: # website/docs/user-guide/messaging/discord.md
…titles # Conflicts: # gateway/platforms/discord.py # website/docs/reference/environment-variables.md
This was referenced Apr 25, 2026
19 tasks
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.
What does this PR do?
Adds an opt-in Discord setting to generate auto-thread titles with Hermes' auxiliary title generator before creating the thread, instead of deriving the thread name directly from the incoming message text.
This adds:
discord.generate_thread_titlesinconfig.yamlDISCORD_GENERATE_THREAD_TITLESas the env overrideImplementation-wise, this also extracts the generic title-generation primitive into a neutral module so the Discord gateway does not depend on the session-title orchestration module.
Related Issue
N/A
I did not find an existing issue/discussion for this feature.
Type of Change
Changes Made
discord.generate_thread_titlestohermes_cli/config.pyand bumped_config_versiondiscord.generate_thread_titlestoDISCORD_GENERATE_THREAD_TITLESingateway/config.pygateway/platforms/discord.pyto generate a title beforecreate_thread(...)agent/title_generation.pyagent/title_generator.pyfocused on session-title orchestration by delegating to the shared helperutils.pyand reused them in the Discord adapterwebsite/docs/user-guide/messaging/discord.mdandwebsite/docs/reference/environment-variables.mdcli-config.yaml.exampletests/agent/test_title_generation.pytests/agent/test_title_generator.pytests/gateway/test_discord_slash_commands.pytests/hermes_cli/test_config.pytests/test_env_utils.pytests/tools/test_local_env_blocklist.pyHow to Test
discord.auto_thread: truediscord.generate_thread_titles: truediscord.generate_thread_titlesand confirm auto-threads fall back to the existing truncated-message title behaviorChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Focused tests for touched areas:
111 passedFull suite in the repo's intended local dev environment (
uv venv venv --python 3.11,uv pip install -e ".[all,dev]",python -m pytest tests/ -q):6178 passed, 164 skipped, 4 failedThe remaining failures appear unrelated to this PR:
tests/agent/test_prompt_builder.py::TestBuildContextFilesPrompt::test_claude_md_uppercase_takes_prioritytests/test_streaming.py::TestStreamingFallback::test_any_stream_error_falls_backtests/test_streaming.py::TestStreamingFallback::test_fallback_error_propagatestests/tools/test_transcription.py::TestGetProvider::test_explicit_openai_no_key_returns_noneI also checked
mainin the same environment:main