Name repos mechanically from the idea, not via gpt-4o-mini - #151
Merged
Conversation
_generate_repo_name called gpt-4o-mini (OpenRouter/OpenAI) to condense the title and silently fell back to the raw idea_id when no OPENROUTER_KEY/OPENAI_API_KEY was set or the call failed, producing names like probabilistic_calibration_metr_20260730_075410_ac649b07. Derive the slug deterministically from idea.yaml, tried in order title -> hypothesis -> domain, then the sanitized idea_id as last resort. Apostrophes are stripped so possessives stay one word. Threads hypothesis through create_research_repo and its two primary callers (runner, submit); fetch_from_ideahub is left to PR ChicagoHAI#147. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Chenxi1818
self-requested a review
July 30, 2026 22:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
_generate_repo_namecondensed the idea title into a slug via agpt-4o-minicall (OpenRouter/OpenAI). When noOPENROUTER_KEY/OPENAI_API_KEYwas set, or the call failed, it silently fell back to the raw idea id, producing names likeprobabilistic_calibration_metr_20260730_075410_ac649b07. This hit any run without an OpenAI-compatible key (for example claude-subscription runs), independent of the--provideragent.Change
Derive the slug deterministically from the idea.yaml content, tried in order title -> hypothesis -> domain, then the sanitized idea id as a last resort. Naming no longer depends on an external LLM or API key. Same
{slug}-{random}-{provider}shape; apostrophes are stripped so possessives stay one word (solver's->solvers).hypothesisis threaded throughcreate_research_repoand its two primary callers (runner,submit).fetch_from_ideahub.pyis left to PR #147 (which is editing it).Testing
Ran the actual function against real workspace titles plus stress cases (blank/stopword-only title, punctuation/symbols, non-ASCII, all-empty). Every output is a valid GitHub name with a deterministic slug, and the fallback ordering resolves correctly.