Skip to content

fix: allow OpenAI model IDs in chat - #226

Merged
QueryPlanner merged 1 commit into
mainfrom
codex/telegram-openai-model-selection
Dec 4, 2026
Merged

QueryPlanner merged 1 commit into
mainfrom
codex/telegram-openai-model-selection

Conversation

@QueryPlanner

Copy link
Copy Markdown
Owner

What

Let Telegram chats select OpenAI Responses models outside the built-in catalog with /model <model-id>.

Why

The built-in catalog rejected IDs such as gpt-6.2-astra before Blacki checked whether the deployment's OpenAI API key could use them.

How

  • Check each new ID with the deployment's OpenAI connection. The check sends fixed text and a function declaration, caps output at 16 tokens, and requests no response storage.
  • Save the verified ID for the chat after OpenAI accepts it. Preserve the existing selection on failure or if another topic changes the model during the check.
  • Use the verified ID on the next turn with the existing conversation history and the provider's default thinking settings.

Tests

  • Ruff formatting and lint, and mypy
  • pytest --cov=src (2,830 passed, 1 skipped, 100% coverage)
  • mkdocs build --strict
  • Bash syntax, production and development Compose config, Docker image build, and local /ready smoke test

- Verify new model IDs through the configured Responses adapter.
- Save verified IDs per chat and preserve ongoing conversations.
- Cover rejected IDs, concurrent selections, and reset.
@QueryPlanner
QueryPlanner marked this pull request as ready for review December 4, 2026 03:47
@QueryPlanner
QueryPlanner merged commit fbd7364 into main Dec 4, 2026
3 checks passed
@QueryPlanner
QueryPlanner deleted the codex/telegram-openai-model-selection branch December 4, 2026 05:05
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.

1 participant