This repository was archived by the owner on Mar 15, 2026. It is now read-only.
Remove Gemini API key param, use env var - #27
Merged
Conversation
Changed parameter from target_format_id to format_id to match the BuildCreativeRequest schema and MCP client expectations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit b5e69fd.
Changed format_id to target_format_id to match the official ADCP spec (/schemas/v1/media-buy/build-creative-request.json). Note: This reveals that the MCP client (Conductor) is sending format_id instead of target_format_id, which is a client-side bug. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added backward compatibility for MCP clients (like Conductor) that incorrectly use 'format_id' instead of 'target_format_id'. The ADCP spec defines 'target_format_id', but some clients use 'format_id'. Now we accept both parameters with clear error messages if neither is provided. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 2306b5b.
Removed gemini_api_key parameter from build_creative tool signature and moved it to GEMINI_API_KEY environment variable. This makes the tool fully ADCP spec-compliant. Per ADCP spec, creative agents should manage their own credentials rather than requiring clients to provide API keys as parameters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Background
The
gemini_api_keyparameter was not compliant with the ADCP spec. API keys should be managed via environment variables for creative agents.Changes
src/creative_agent/schemas/build.py: Removedgemini_api_keyfromBuildCreativeRequestschema.src/creative_agent/server.py: Removedgemini_api_keyparameter frombuild_creativefunction. The function now reads the Gemini API key from theGEMINI_API_KEYenvironment variable. Added a more informative error message if the environment variable is not set.Testing
build_creativewithoutGEMINI_API_KEYset, verify error message.build_creativewithGEMINI_API_KEYenvironment variable set, verify successful execution.target_format_idparameter is still correctly handled.