Skip to content

Conversation

@KRRT7
Copy link
Collaborator

@KRRT7 KRRT7 commented Jan 12, 2026

Summary

  • Add --server CLI flag to switch between local/prod AI service
  • Set 5 min timeout for local AI service to prevent indefinite hangs

Usage

codeflash --file foo.py --server local
codeflash --file foo.py --server prod

Add CLI flag to switch between local/prod AI service without env vars.
Set 5 min timeout for local to prevent hanging on issues.
action="store_true",
help="(Deprecated) Async function optimization is now enabled by default. This flag is ignored.",
)
parser.add_argument(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this over the env var method?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't really want to make this part of the user interface for codeflash cli

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A/B testing, i want the flexibility so that I don't have to touch my env vars

from codeflash.code_utils.github_utils import require_github_app_or_exit

if args.server:
os.environ["CODEFLASH_AIS_SERVER"] = args.server
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can go wrong because there is no validation of user input to be only prod/local

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's meant to be for internal use only so I think we'll be ok

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.

3 participants