Skip to content

fix: drop ChatGPT Ads ad-group and campaign update flags the server rejects - #27

Merged
1099271 merged 3 commits into
mainfrom
damien/10-20-fix-chatgpt-ads-adgroup-flags
Oct 21, 2026
Merged

1099271 merged 3 commits into
mainfrom
damien/10-20-fix-chatgpt-ads-adgroup-flags

Conversation

@1099271

@1099271 1099271 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Replaces #26, which GitHub closed when its base branch (#25) was deleted on merge. Same change; the branch now merges main so it applies on top of the squashed #25.

Stacked on #25 (base is its branch; retarget to main after #25 merges).

Summary

Removes ChatGPT Ads flags that the nex-studio backend rejects or silently drops, so the CLI only offers the 1 Campaign : M Ad Groups : N Ads fields that work.

Command Removed Backend evidence (nex-studio)
ad-group create --group-type ad_groups.py group_body: non-manual raises
--negative-context, --ad-prompt, --image-url, --daily-budget, --example-query, --allowed-devices group_body unsupported list raises
--allowed-countries not in normalize.py allowlist, never mapped
--brand-name (was required) group_body only writes name/status/bidding_config/context_hints; brand_name is read only at campaign create (campaign_bodies.py gravity)
ad-group update --landing-page update_ad_group raises "Update the Ad target URL"
--image-url, --daily-budget group_body raises
--brand-name dropped as above
campaign update --landing-page parity_campaign_body raises on update
--objective any change raises "Campaign bidding_type cannot be changed"

Added: ad-group update --max-cpc (was -p max_cpc=N only). group_body reads the parent campaign bidding type and writes bidding_config.max_bid_micros, so each ad group bid changes alone. Help text states the unit: CPC (clicks), CPA (conversions), CPM (reach).

Kept on ad-group create: --name, --landing-page (default URL for inline --ads), --context, --max-cpc, --ads.

Also: unreleased changelog note + commands.changed; bundled skill skills/soku/references/ads-write.md example drops --brand-name and uses --max-cpc on update.

Test

  • pnpm typecheck pass
  • pnpm test: 250 + 22 pass, 0 fail. New test asserts the kept/removed flag sets on ad-group create|update and campaign update.
  • No writes to any provider account.

🤖 Generated with Claude Code

1099271 and others added 3 commits October 20, 2026 19:41
`ads chatgpt campaign create` exposed campaign-level flags the server
rejects: `--max-cpc`, `--billing-model` (only cpc is accepted, on the ad
group), `--allowed-countries` (never mapped; geo is `geo_targets`), and the
`leads` objective. Bids live on each ad group and are independent of
sibling groups.

`ads chatgpt campaign migrate-legacy` called `migrate_legacy_ad_units`,
which no longer exists on the server or in the capability manifest.

`ads chatgpt ad create` required `--cta`, which OpenAI Ads rejects, so the
command always failed. `--cta` and `--description` are removed from
`ad create` and `ad update`.

The bundled `ads-write.md` reference now shows one campaign with two
groups, each with its own bid and two ads, and states which fields are
campaign-level and which are group-level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ejects

- ad-group create: drop --brand-name, --group-type, --negative-context,
  --ad-prompt, --image-url, --daily-budget, --example-query,
  --allowed-countries, --allowed-devices (group_body rejects or never
  writes them).
- ad-group update: drop --landing-page, --brand-name, --image-url,
  --daily-budget; add --max-cpc for per-group bids.
- campaign update: drop --landing-page and --objective (bidding_type is
  fixed after create).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve against the squashed #25 on main: the tree equals main plus this
branch's own commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1099271
1099271 merged commit b6302c6 into main Oct 21, 2026
2 checks passed
@1099271
1099271 deleted the damien/10-20-fix-chatgpt-ads-adgroup-flags branch October 21, 2026 03:00
1099271 added a commit that referenced this pull request Oct 21, 2026
## Summary
Release `@soku-ai/cli` 0.1.0-alpha.25. Stamped with `node
scripts/stamp-release.mjs 0.1.0-alpha.25`; on merge, CI tags
`soku-ai-cli-v0.1.0-alpha.25` and `publish.yml` publishes to npm.

## Carried changes (since alpha.24)
- ChatGPT Ads 1 campaign : M ad groups : N ads (#25), matching
nex-studio About-Intelligence/nex-studio#6450.
- ChatGPT Ads ad-group / campaign update flags the server rejects are
removed (#27, replaces closed #26).
- Typed flags that two platforms spell alike now go to the selected
platform's param.

## Verification
- `node scripts/stamp-release.mjs --check`: version consistent across
package.json, src/version.ts, changelog.json, SKILL.md and all plugin
manifests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant