Premium-model cost warning only covers OPENROUTER_MODEL
Current-main boundary
On main 007a1a7 (0.9.30), detectProvider() warns once when the configured model is in the premium tier (sonnet|opus|gpt-5.x-sol|gpt-4o|gpt-4-turbo), because background compression on such a model can cost dollars per day. The check sits only in the OpenRouter branch. The OpenAI-compatible branch is checked first and returns before it, so OPENAI_MODEL is never checked, also when OPENAI_BASE_URL points at OpenRouter or another proxy that serves the same premium models.
Reproduction and results (from the code path)
OPENAI_API_KEY=… OPENAI_BASE_URL=https://openrouter.ai/api/v1 OPENAI_MODEL=anthropic/claude-sonnet-5
Result: no warning. The same model through OPENROUTER_MODEL prints the cost warning.
Required behavior
- The same premium-tier check and one-time warning apply to
OPENAI_MODELin the OpenAI-compatible branch. - The message names the variable that holds the model.
AGENTMEMORY_SUPPRESS_COST_WARNINGsilences both.
Acceptance checks
Tests: premium OPENAI_MODEL warns once naming OPENAI_MODEL; a non-premium model does not warn; suppression works; the OpenRouter case keeps its current text.
Source and existing work
OpenAI branch, OpenRouter branch with the warning.
Environment: agentmemory 0.9.30, Node v26.10.0, macOS 27.0.1 (arm64).