Baseline
Reproduced from v1.3.1 at 5a306f8956cb1eeae69f9709de0e4d61b44e11e7.
Reproduction
- Generate an ADK project with
deployment_target: none.
- Use an isolated local environment without Application Default Credentials.
- Import or start the generated
app/fast_api_app.py.
The generated module unconditionally calls google.auth.default(), constructs google.cloud.logging.Client(), and always sets otel_to_cloud=True.
Actual behavior
A local-only template needs cloud credentials and a Cloud Logging dependency merely to import/start. This makes the none target fail in a normal offline/no-ADC development environment.
Expected behavior
The local target should use Python stdlib logging and start without ADC. Existing cloud OTEL behavior should remain opt-in through the public --otel-to-cloud flag only.
Minimal fix
- use
logging.getLogger(__name__) in the local template and remove its Cloud Logging dependency;
- pass a private child-only
AGENTS_CLI_OTEL_TO_CLOUD=1 value only when --otel-to-cloud is explicitly set;
- remove any inherited copy of that private variable when the option is off;
- read the private flag before loading project
.env files, accepting only the exact value 1.
Reference implementation: benagentai93-dot@d888f8d
Test evidence
Runnable regressions cover dependency output, import without ADC, exact opt-in behavior, inherited-environment removal, explicit child propagation, and the existing ADK fallback flag.
Fork verification on Python 3.11/3.13:
- focused Batch 1 suite: 17 passed
- full root suite: 19 passed
- lint, type check, build, and installed-wheel smoke: passed
Baseline
Reproduced from v1.3.1 at
5a306f8956cb1eeae69f9709de0e4d61b44e11e7.Reproduction
deployment_target: none.app/fast_api_app.py.The generated module unconditionally calls
google.auth.default(), constructsgoogle.cloud.logging.Client(), and always setsotel_to_cloud=True.Actual behavior
A local-only template needs cloud credentials and a Cloud Logging dependency merely to import/start. This makes the
nonetarget fail in a normal offline/no-ADC development environment.Expected behavior
The local target should use Python stdlib logging and start without ADC. Existing cloud OTEL behavior should remain opt-in through the public
--otel-to-cloudflag only.Minimal fix
logging.getLogger(__name__)in the local template and remove its Cloud Logging dependency;AGENTS_CLI_OTEL_TO_CLOUD=1value only when--otel-to-cloudis explicitly set;.envfiles, accepting only the exact value1.Reference implementation: benagentai93-dot@d888f8d
Test evidence
Runnable regressions cover dependency output, import without ADC, exact opt-in behavior, inherited-environment removal, explicit child propagation, and the existing ADK fallback flag.
Fork verification on Python 3.11/3.13: