For the complete documentation index, see llms.txt. This page is also available as Markdown.

👾Code Agents with FPT Serverless Inference (Cloud API)

This explains how to connect popular code agents to Serverless Inference through the FPT AI Marketplace. Use it to configure endpoints, API keys, an internal proxy, and the right model for each tool. See Task recommendation by roles to select an LLM for each task.

Use code agents effectively

Give AI models clear instructions to prevent endless agent loops and incorrect implementation paths. This prevents endless agent loops and incorrect implementation paths.

Instruction principles — use English where possible:

  • Use AGENTS.md — place it at the repository root. Agents read its context, working principles, and common commands at session start. OpenCode, Cline, and Roocode support this automatically. This instruction includes an AGENTS.md file.

    • AGENTS.md → for OpenCode (Sisyphus)

    • CLAUDE.md → for Claude CLI (claude)

  • Keep prompts short, specific, and example-driven — instead of "fix the auth", write: "In auth.py:45, replace token = req.headers.get('token') with token = req.headers.get('Authorization', '').removeprefix('Bearer ')"

  • Control code loops — when an agent repeats work without progress, use: "Stop. Summarize what you've tried and what's blocking you." You can also add a stopping condition: "If you can't fix it in 3 attempts, stop and explain."

  • Break tasks into smaller steps"Only do step 1: write the function. Don't run or test yet." Always ask the agent to plan first, then execute: "List the steps you'll take. Don't execute yet."


API Endpoint: https://mkp-api.fptcloud.com/v1 Company proxy: http://10.36.232.10:8080


1. OpenCode

Installation

# Request administrator access at: https://uservice.fci.vn/secure/SSC01CreateTicket.jspa?processId=147&catalogId=2&issueKeys=
# Select the Whitelist option.

# Install Node.js LTS.
winget install OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements

# Install OpenCode with npm, Scoop, or Chocolatey.
npm install -g opencode-ai
# Or run: scoop install opencode  /  choco install opencode

API configuration

File: %USERPROFILE%\.config\opencode\opencode.jsonc

Run on Windows


Ubuntu

Installation:

Or use npm:

API configuration:

Create the OpenCode directory if needed: mkdir $HOME/.config/opencode

Create opencode.jsonc: touch $HOME/.config/opencode/opencode.jsonc

Create an API key for Qwen 3.6-27B in the AI Marketplace: https://marketplace.fptcloud.com/

Update $HOME/.config/opencode/opencode.jsonc:

Run:


Optional

For an improved experience, install the oh-my-openagent plugin.

2. Cline (VS Code extension)

  1. Install the Cline extension in VS Code.

  2. Open Cline Settings → select API Provider: OpenAI Compatible.

  3. Enter:

Field
Value

Base URL

https://mkp-api.fptcloud.com/v1

API Key

<API_KEY>

Model

Qwen3.6-27B

  1. Configure the proxy in VS Code settings (settings.json):


3. Roocode (VS Code extension)

See the OpenAI-compatible provider connection guide.

Enter:

  • Base URL: https://mkp-api.fptcloud.com/v1

  • API Key: <API_KEY>

  • Model: Qwen3.6-27B


4. Claude CLI with FPT AI Marketplace

Claude CLI sends API keys in the Anthropic-style x-api-key header. FPT AI Marketplace requires Authorization: Bearer. The following configuration overrides environment variables for marketplace compatibility. It also uses a separate configuration directory to avoid conflicts with a claude.ai account.

Note: The following configuration uses the MODAS Vietnam site only

Currently, use the fixed stable Claude Code version 2.1.150. Disable automatic updates in settings.json:

{ "theme": "dark", "model": "opus", "env": { "DISABLE_AUTOUPDATER": "1" } }

Configuration — add to your PowerShell profile

Open your profile:

Add this to the end of the file:

Commands

Command
Description

claude-mkp

Runs Claude CLI through MKP

claude-mkp <args>

Passes additional arguments as usual

ccdm

Runs with --dangerously-skip-permissions

Temporarily change the model:


Ubuntu

Add this to ~/.bashrc or ~/.zshrc:

Temporarily change the model:

Why use ANTHROPIC_AUTH_TOKEN instead of ANTHROPIC_API_KEY?

Sent header
Variable
Accepted by MKP?

x-api-key: sk-...

ANTHROPIC_API_KEY

No → 401

Authorization: Bearer sk-...

ANTHROPIC_AUTH_TOKEN

Yes → 200 OK

Test the connection

Troubleshooting

Symptom
Cause and resolution

Auth conflict warning

Ensure CLAUDE_CONFIG_DIR is set inside the function, not globally.

Retrying in Xs · attempt N/10

MKP rejected authentication. Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY.

401 "Missing API Key"

The header is incorrect. Use Authorization: Bearer, not x-api-key.

Last updated

Was this helpful?