AI for 1C: how to write code in the built-in language with a model

A model cannot see your configuration and may invent methods and attributes. Here is how to give them metadata and examples, verify the code and estimate request costs.

5 min · · development · models

An AI model for writing 1C code is a request that every 1C developer makes when ten similar tasks pile up in the queue. A model can write a procedure or a query in the built-in language, but there is a risk: it may invent methods and attributes that do not exist in your configuration. Below we look at how to handle that risk: what to give the model, how to verify the result and what it costs.

What models know about 1C and what they do not

The 1C:Enterprise language is relatively narrow: there is less of it in the open than Python or JavaScript. Hence the risks worth checking:

  • syntax from different platform versions mixed together, and calls to methods that do not exist in your version;
  • invented names of attributes and registers: the model cannot see your configuration;
  • client and server context mixed up (the &НаКлиенте and &НаСервере directives), with server calls from client code without passing data;
  • queries in SQL style instead of the 1C query language.

The good news is that part of these problems is removed by the prompt itself. The model needs context, not just the task.

What to put in the request

A minimal set for a task in a standard configuration:

  1. Configuration and version. For example, "Trade Management 11, platform 8.3". State what you actually have installed.
  2. Metadata. Names of the objects the code works with: document, register, catalogue, their attributes and types. You can export the list from the configurator or EDT as text and paste the relevant piece.
  3. Execution context. Where the code will run: a client form, a server procedure, a posting handler, a background job.
  4. An example of neighbouring code. The module where the procedure will live. The model will follow your style and naming.
  5. An explicit ban. A phrase like "use only the attributes I listed; if something is missing, ask a question instead of inventing".

Do not send personal data, trade secrets or real databases in the request. The task needs structure, not contents.

A request template

bash
1C platform 8.3, configuration: Trade Management 11.
Task: a server function returning stock balances for a warehouse.
Objects (use only these):
- AccumulationRegister.ТоварыНаСкладах, resource ВНаличии,
  dimensions Номенклатура, Склад
Requirements:
- a 1C query language query with the &Склад parameter;
- return a value table;
- do not use attributes that are not in the list.
If data is missing, ask a clarifying question.

The object names here are only an example: in your configuration they may differ, so always substitute your own.

An example result

An answer to such a request might look roughly like this:

bash
&НаСервере
Функция ПолучитьОстатки(Склад)

	Запрос = Новый Запрос;
	Запрос.Текст =
		"ВЫБРАТЬ
		|	ТоварыНаСкладахОстатки.Номенклатура КАК Номенклатура,
		|	ТоварыНаСкладахОстатки.ВНаличииОстаток КАК Остаток
		|ИЗ
		|	РегистрНакопления.ТоварыНаСкладах.Остатки(, Склад = &Склад) КАК ТоварыНаСкладахОстатки";
	Запрос.УстановитьПараметр("Склад", Склад);

	Возврат Запрос.Выполнить().Выгрузить();

КонецФункции

The code looks plausible, but that is not yet verification. Your actions come next.

How to verify the code

Treat the model's answer like code from an intern: fast, but with a mandatory review.

  1. Syntax check. Paste the code into a test copy of the configuration and run the module syntax check in the Configurator or EDT. It catches typos and non-existent methods.
  2. Name check. Compare every attribute, dimension and resource name against the metadata structure. This is the most vulnerable spot, because the model cannot see your configuration.
  3. Run on a test database. Run the code on a copy with a small data set. For queries, look at the result in the query console.
  4. Edge cases. Empty values, missing records, wrong parameter types. Ask the model to write a list of such cases, then check them by hand.
  5. Locks and performance. For document posting and large selections, check there are no queries inside loops. Look specifically for database calls inside Для Каждого.

If you need to change code in many modules at once, you can export the configuration to files and connect a console agent such as Claude Code that reads the project. How exactly to export the configuration (Configurator or EDT format) is in the 1C platform documentation. Agent setup is described in the Claude Code section. Edits made this way still go through the same checks.

Which models to try

It is impossible to say in advance which model knows 1C better: we have no reliable public measurements on 1C. A practical approach is to collect 10–15 of your own typical tasks and run them on several models. Zukko prices at October 18, 2026 ($ per 1M tokens, input / output) and the Intelligence Index:

ModelInput / outputIndex
deepseek-v4.1-flash0.013 / 0.03839
gpt-6.1-sol0.27 / 1.3252
claude-sonnet-5-50.4 / 248
claude-opus-5-50.8 / 458

The index is a general strength indicator; it does not reflect knowledge of 1C specifically. Your own test decides.

What a request costs

Suppose you send a module plus a metadata description of 6,000 tokens and get 1,500 tokens of code back. Formula: input × input price + output × output price.

  • deepseek-v4.1-flash: 6,000 × 0.013 / 1,000,000 + 1,500 × 0.038 / 1,000,000 = $0.000078 + $0.000057 = $0.000135
  • gpt-6.1-sol: 6,000 × 0.27 / 1,000,000 + 1,500 × 1.32 / 1,000,000 = $0.00162 + $0.00198 = $0.0036
  • claude-sonnet-5-5: $0.0024 + $0.003 = $0.0054
  • claude-opus-5-5: $0.0048 + $0.006 = $0.0108

Cyrillic in identifiers usually takes more tokens than Latin, so on Russian-language code the bill may be higher. You can measure the request size in advance with count_tokens.

How to send a request from your own code

If you prepare requests with a script, the regular OpenAI SDK with the Zukko address works:

bash
from openai import OpenAI

client = OpenAI(base_url="https://api.zukko.pro/v1", api_key="fetch_your_key")

response = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[
        {"role": "system", "content": "You help write 1C:Enterprise 8.3 code. Do not invent attributes."},
        {"role": "user", "content": "Platform 8.3 ... (metadata and task)"},
    ],
)
print(response.choices[0].message.content)

The format is described in the chat completions documentation. If you want to call a model from inside 1C itself, see integrating a model into 1C:Enterprise.

FAQ

Which model is best for 1C programming?

There is no reliable answer: different models fail in different places, and there are few public measurements on 1C. Run your tasks on two or three models and compare quality and request cost.

Can I trust the code without checking it?

No. Always check the syntax in the Configurator or EDT and compare object names with the metadata. Run the code on a copy of the database first.

Should I send the whole configuration to the model?

No need. A description of the objects the task touches and the neighbouring code is enough. A large context costs money and does not guarantee a better result.

How do I pay for access?

Access from Russia goes through the gateway, and payment is available by SBP (with the payment page fee of 8.5%), with a MasterCard card or with cryptocurrency. Create a key in the dashboard.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

AI for writing 1C code: how to avoid mistakes · Zukko