Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Update default model to gpt-5.1

Summary

Changed the default OpenAI model from gpt-5 to gpt-5.1 in the Settings configuration. When users don't specify a MODEL environment variable, storymachine will now use gpt-5.1 instead of gpt-5.

Files changed:

  • src/storymachine/config.py: Updated default model value
  • tests/test_config.py: Updated test assertion to match new default

Review & Testing Checklist for Human

  • Verify that gpt-5.1 is a valid and available OpenAI model name
  • Run an end-to-end test without setting the MODEL environment variable to confirm the application works with the new default
  • Consider if README or other documentation mentions the default model and needs updating

Test Plan

  1. Unset the MODEL environment variable (or use a fresh environment)
  2. Run uv run storymachine --prd <test-prd> --tech-spec <test-spec> --repo <test-repo>
  3. Verify the application successfully uses gpt-5.1 and generates stories

Notes

  • All existing tests pass with the updated default
  • Users who have MODEL explicitly set in their environment are unaffected by this change
  • The model detection logic in ai.py already supports gpt-5.x models via the model.startswith("gpt-5") check, so no changes were needed there

Requested by: nilenso ([email protected] / @tfidfwastaken)
Devin session: https://app.devin.ai/sessions/87db1c328d3e4221a705de21c27ba506

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@claude
Copy link

claude bot commented Nov 19, 2025

Code Review: Update default model to gpt-5.1

Summary

This PR updates the default OpenAI model from gpt-5 to gpt-5.1. The changes are minimal and focused, affecting only the configuration default and its corresponding test.

✅ Code Quality & Best Practices

Positive aspects:

  • Minimal scope: The change is appropriately scoped to just the default value and its test
  • Type safety: No type issues introduced - the field remains str
  • Follows conventions: Adheres to CLAUDE.md guidelines (type hints present, simple focused change)
  • Test coverage: The test was updated to match the new default value

Code structure:

  • src/storymachine/config.py:10: Clean default value update
  • tests/test_config.py:142: Test assertion correctly updated

⚠️ Concerns & Questions

1. Model Validity (CRITICAL)

The PR description includes a checklist item: "Verify that gpt-5.1 is a valid and available OpenAI model name."

Issue: As of January 2025 (my knowledge cutoff), OpenAI has not publicly announced a gpt-5.1 model. The standard naming convention for OpenAI models includes:

  • GPT-4 series: gpt-4, gpt-4-turbo, gpt-4o
  • O-series: o1, o1-preview, o1-mini, o3-mini

Recommendation:

  • Verify this model name is valid in OpenAI's API before merging
  • If this is a future/beta model, consider adding a comment explaining this
  • Test against the actual OpenAI API to ensure it doesn't fail with "model not found"

2. Compatibility Check

The model detection logic in src/storymachine/ai.py:43 correctly handles gpt-5.x models via the prefix check:

or (model.startswith("gpt-5") and not model.startswith("gpt-5-chat"))

✅ This will work for gpt-5.1, so no compatibility issues there.

3. Documentation

The README.md doesn't explicitly mention the default model anywhere. While not required, users might benefit from knowing:

  • What model is used by default
  • How to override it with the MODEL environment variable

Optional improvement: Consider adding a brief note in README.md about model configuration.

🔍 Testing Recommendations

Per the PR description checklist, the following tests should be performed:

  1. End-to-end test without MODEL env var:

    unset MODEL
    uv run storymachine --prd <test-prd> --tech-spec <test-spec> --repo <test-repo>

    This will verify the model actually exists and works with OpenAI's API.

  2. Verify existing users are unaffected:
    Users with MODEL set in their environment should see no changes.

🔒 Security & Performance

  • Security: No security concerns - this is just a configuration default
  • Performance: Model choice affects API costs and response times
    • If gpt-5.1 is more expensive or slower than gpt-5, users should be aware
    • Consider documenting cost/performance implications

📋 Final Verdict

Status: ⚠️ Needs Verification Before Merge

Must address:

  1. Confirm gpt-5.1 is a valid, publicly available OpenAI model
  2. Test against OpenAI API to ensure it doesn't error

Nice to have:

  1. Document the default model in README.md
  2. Note any cost/performance differences from gpt-5

Once model validity is confirmed, the code changes themselves are clean and follow best practices. The implementation is correct and maintains backward compatibility.


Review based on CLAUDE.md guidelines and codebase conventions

@devin-ai-integration
Copy link
Contributor Author

Closing due to inactivity for more than 7 days. Configure here.

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