Skip to content

Conversation

OskarStark
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
Docs? no
Issues Follows #640
License MIT
  • Extract model definitions to models.php
  • Update ModelCatalog to load models from external file at runtime
  • Improve maintainability and organization

@carsonbot carsonbot added Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review labels Sep 29, 2025
@OskarStark OskarStark marked this pull request as draft September 30, 2025 09:15
- Extract model definitions to src/Bridge/OpenAi/Resources/models.php
- Update ModelCatalog to load models from external file at runtime
- Improve maintainability and organization
- All tests passing (28 ModelCatalog tests, 131 OpenAI bridge tests)
@OskarStark OskarStark force-pushed the refactor-openai-model-catalog branch from 45a9963 to d238fb2 Compare October 2, 2025 13:59
- Add models.schema.json with complete JSON Schema definition
- Enhance PHPDoc with detailed capability documentation
- Reference schema file for IDE support and validation
- All model classes and capabilities documented inline
- Create Model class with constants for all OpenAI model identifiers
- Add @phpstan-type OpenAiModelName with literal union types
- Override getModel() with detailed documentation
- Add tests to verify constants match catalog models
- Enable full IDE autocompletion for model names in PhpStorm
- Create bin/generate-model-schema.php to generate JSON schema from models.php
- Automatically extract classes and capabilities from models
- Update schema pattern to support dots in model names (e.g., gpt-4.1)
- Script can be run manually or integrated into CI/CD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants