Repository navigation
Backlog
Labels
bugSomething isn't working
Description
Describe the bug
API Error: Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.
To Reproduce
- Go to extension settings
- Navigate to API Key Configuration, select a model newer that at least GPT-5, e.g.
gpt-5-nano-2025-08-07orgpt-6-luna - Click 'Test API Connection'
Expected behavior
API connection test succeeds, any model can be used
Environment:
- Thunderbird Version: 160.0 (x64)
- AutoSort+ Version: 1.4.1
- OS: archlinux
Logs
Settings retrieved:
Object { hasApiKey: true, provider: "openai", labels: (14) […], enableAi: true }
[background.js:921:17](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
Making API request to OpenAI... [background.js:1066:21](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
API response status: 400 [background.js:1233:21](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
API Error details: Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. [background.js:1252:25](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
API response status: 400 [background.js:1233:21](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
API Error details: Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. [background.js:1252:25](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
API response status: 400 [background.js:1233:21](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
API Error details: Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. [background.js:1252:25](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
[AutoSort+] AutoSort+ Batch Complete: Processed 53 message(s): 0 sorted, 53 skipped, 0 failed [background.js:712:13](moz-extension://7b97a684-fb87-4d4b-a02f-049fade04fbe/background.js)
Top
Metadata
Metadata
Assignees
Labels
bugSomething isn't working

Activity
github-actions commentedon Nov 30, 2026
👋 Welcome and thanks for opening your first issue!
We appreciate you taking the time to contribute or report a problem. Someone will review this as soon as possible. In the meantime, please make sure you've included all relevant details (like logs, steps to reproduce, or environment info).
Nigel1992 commentedon Nov 30, 2026
Thanks for the detailed report, @weltenseglr — this is fixed in v1.4.2 🎉
📥 Download
What changed
max_completion_tokensinstead ofmax_tokens.temperature), AutoSort+ automatically retries without it.max_tokensstill work.Install in Thunderbird
autosortplus.xpiusing the link above..xpifile.Please give it a try with
gpt-5-nano-2025-08-07(or another GPT-5+ model) and let me know if it works. I'll leave this issue open until you confirm — thanks again!Nigel1992 commentedon Dec 4, 2026
@weltenseglr Could you kindly confirm this is now fixed?