Skip to content

Commit d2c5af5

Browse files
jsonbaileyclaude
andcommitted
chore: Set default values for optional LaunchDarkly keys in example env files
Python's os.getenv(key, default) returns the default only when the var is unset. dotenv loads `KEY=` as a *set* empty string, so a user who copies `.env.example` to `.env` without editing would silently get an empty string and the AI Config lookup would fail. Setting the documented defaults inline (e.g. LAUNCHDARKLY_COMPLETION_KEY= sample-completion) fixes that and removes the duplicate "defaults to X" comments. Required vars (SDK key, provider keys) stay blank. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 17c8bcb commit d2c5af5

10 files changed

Lines changed: 22 additions & 22 deletions

File tree

features/create_agent/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ LAUNCHDARKLY_SDK_KEY=
44
# Provider API key(s) for the provider your agent config uses
55
OPENAI_API_KEY=
66

7-
# Optional - defaults to "sample-agent"
8-
LAUNCHDARKLY_AGENT_KEY=
7+
# Override to use a different AI Config
8+
LAUNCHDARKLY_AGENT_KEY=sample-agent

features/create_agent_graph/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ LAUNCHDARKLY_SDK_KEY=
44
# Provider API key(s) for the provider(s) your agent graph uses
55
OPENAI_API_KEY=
66

7-
# Optional - defaults to "sample-agent-graph"
8-
LAUNCHDARKLY_AGENT_GRAPH_KEY=
7+
# Override to use a different AI Config
8+
LAUNCHDARKLY_AGENT_GRAPH_KEY=sample-agent-graph

features/create_judge/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ LAUNCHDARKLY_SDK_KEY=
44
# Provider API key(s) for the provider your judge config uses
55
OPENAI_API_KEY=
66

7-
# Optional - defaults to "sample-judge"
8-
LAUNCHDARKLY_JUDGE_KEY=
7+
# Override to use a different AI Config
8+
LAUNCHDARKLY_JUDGE_KEY=sample-judge

features/create_model/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ LAUNCHDARKLY_SDK_KEY=
44
# Provider API key(s) for the provider your AI config uses
55
OPENAI_API_KEY=
66

7-
# Optional - defaults to "sample-completion"
8-
LAUNCHDARKLY_COMPLETION_KEY=
7+
# Override to use a different AI Config
8+
LAUNCHDARKLY_COMPLETION_KEY=sample-completion

getting_started/bedrock/converse/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ AWS_SECRET_ACCESS_KEY=
88
# Optional - defaults to "us-east-1"
99
AWS_DEFAULT_REGION=
1010

11-
# Optional - defaults to "sample-completion"
12-
LAUNCHDARKLY_COMPLETION_KEY=
11+
# Override to use a different AI Config
12+
LAUNCHDARKLY_COMPLETION_KEY=sample-completion

getting_started/gemini/generate_content/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ LAUNCHDARKLY_SDK_KEY=
44
# Your Google API key
55
GOOGLE_API_KEY=
66

7-
# Optional - defaults to "sample-completion"
8-
LAUNCHDARKLY_COMPLETION_KEY=
7+
# Override to use a different AI Config
8+
LAUNCHDARKLY_COMPLETION_KEY=sample-completion

getting_started/langchain/invoke/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ GOOGLE_API_KEY=
77
AWS_ACCESS_KEY_ID=
88
AWS_SECRET_ACCESS_KEY=
99

10-
# Optional - defaults to "sample-completion"
11-
LAUNCHDARKLY_COMPLETION_KEY=
10+
# Override to use a different AI Config
11+
LAUNCHDARKLY_COMPLETION_KEY=sample-completion

getting_started/langgraph/react_agent/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ GOOGLE_API_KEY=
77
AWS_ACCESS_KEY_ID=
88
AWS_SECRET_ACCESS_KEY=
99

10-
# Optional - defaults to "sample-agent"
11-
LAUNCHDARKLY_AGENT_KEY=
10+
# Override to use a different AI Config
11+
LAUNCHDARKLY_AGENT_KEY=sample-agent

getting_started/langgraph/state_graph/.env.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ GOOGLE_API_KEY=
77
AWS_ACCESS_KEY_ID=
88
AWS_SECRET_ACCESS_KEY=
99

10-
# Optional - defaults to "code-review-analyzer"
11-
LAUNCHDARKLY_ANALYZER_KEY=
10+
# Override to use a different AI Config
11+
LAUNCHDARKLY_ANALYZER_KEY=code-review-analyzer
1212

13-
# Optional - defaults to "code-review-documentation"
14-
LAUNCHDARKLY_DOCUMENTATION_KEY=
13+
# Override to use a different AI Config
14+
LAUNCHDARKLY_DOCUMENTATION_KEY=code-review-documentation

getting_started/openai/chat_completions/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ LAUNCHDARKLY_SDK_KEY=
44
# Your OpenAI API key
55
OPENAI_API_KEY=
66

7-
# Optional - defaults to "sample-completion"
8-
LAUNCHDARKLY_COMPLETION_KEY=
7+
# Override to use a different AI Config
8+
LAUNCHDARKLY_COMPLETION_KEY=sample-completion

0 commit comments

Comments
 (0)