Skip to content

Conversation

@35C4n0r
Copy link
Collaborator

@35C4n0r 35C4n0r commented Jan 13, 2026

Description

  • Add support for AI Bridge

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/claude-code
New version: v4.5.0
Breaking change: [ ] Yes [ ] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun fmt)
  • Changes tested locally

Related Issues

Closes: #649

@35C4n0r 35C4n0r marked this pull request as draft January 13, 2026 10:40
@35C4n0r 35C4n0r self-assigned this Jan 13, 2026
@35C4n0r
Copy link
Collaborator Author

35C4n0r commented Jan 13, 2026

wip.

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

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

Left some comments, but looks good. Also, what do you think about moving the AI Bridge example a bit higher before Bedrock and Vertex AI examples?

@35C4n0r 35C4n0r marked this pull request as ready for review January 15, 2026 06:08
Comment on lines +178 to +181
# Add API key only if set
if [ -n "${CLAUDE_API_KEY:-}" ]; then
jq --arg apikey "${CLAUDE_API_KEY}" '.primaryApiKey = $apikey' "$claude_config" > "${claude_config}.tmp" && mv "${claude_config}.tmp" "$claude_config"
fi
Copy link
Member

Choose a reason for hiding this comment

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

Do we get any benefit from adding the key to the file? Why not only rely on coder_env and set it as ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be best to do this as well. Since this is the best way to ensure its set for claude-code globally in the environment. I moved the model to a coder env in the previous update as well.

Copy link
Member

Choose a reason for hiding this comment

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

I am a bit confused. Are you in favoir or against of moving this to an ENV variable?

@DevelopmentCats
Copy link
Contributor

@35C4n0r other than what atif mentioned this looks good to me!

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

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

The coder_ai_task + data.coder_task.me boilerplate appears twice:

  1. In "Usage with Tasks and Advanced Configuration"
  2. In "Usage with tasks and AI Bridge"

Suggestion: Consolidate by showing the tasks pattern once, then have AI Bridge examples just show the enable_aibridge = true addition:

### Usage with Tasks

resource "coder_ai_task" "task" {
  count  = data.coder_workspace.me.start_count
  app_id = module.claude-code.task_app_id
}

data "coder_task" "me" {}

module "claude-code" {
  source    = "registry.coder.com/coder/claude-code/coder"
  version   = "4.5.0"
  agent_id  = coder_agent.main.id
  workdir   = "/home/coder/project"
  ai_prompt = data.coder_task.me.prompt
  
  # Optional: route through AI Bridge
  # enable_aibridge = true
}

Then the AI Bridge section can be simplified to just show standalone usage and reference that tasks work by adding enable_aibridge = true to the above example.

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.

Add AI Bridge Integration to Claude Code Module

4 participants